ArrayShift
Last updated
Was this helpful?
Was this helpful?
arr = [
1,
2,
3
];
el = arr.shift();
writeOutput( el );
numbers = [
1,
2,
3,
4
];
ArrayShift( numbers );
Dump( numbers ); // Outputs 1
moreNumbers = [
5,
6,
7,
8
];
ArrayShift( moreNumbers );
Dump( numbers ); // Outputs 5
numbers = [
"one",
"two",
"three",
"four"
];
ArrayShift( numbers );
Dump( numbers );
// Outputs one