Clear all items from array
ArrayClear(array=[modifiableArray])
array
modifiableArray
true
The array to clear.
Uses the arrayClear function to clear the value of an array
someArray = [
"Red",
"White",
"Green",
"Blue",
"Pink"
];
writeOutput(
// Transpiler workaround for BIF return type
(( arg1 ) => {
arrayClear( arg1 );
return true;
})( someArray ) );
Result: Yes
To clear the value of an array
someArray = [
"Red",
"White",
"Green",
"Blue",
"Pink"
];
writeOutput(
// Transpiler workaround for BIF return type
(( arg1 ) => {
arrayClear( arg1 );
return true;
})( someArray ) );
Result: true
Uses the member function is the same as running arrayClear.
numberArray = [
1,
2,
3
];
writeOutput( numberArray.Clear() );
Result: Yes
// Creates an array containing 4 elements with the numbers 1 - 4.
numbers = [
1,
2,
3,
4
];
dump( numbers ); // outputs the array containing 1 - 4
// Clears the array leaving an array with 0 elements.
ArrayClear( numbers );
dump( numbers );
// outputs the empty array