array.erase [method]

array.erase( int[, int] )

erases item or a range of items from the array, depending on the arguments passed or emits a warning on failure, returns the array for chaining

a = [ 5, 6, 7, 8 ];
a.erase( 1, 2 ); // erases all items between position 1 and 2, including; gives a = [5,8]
a.erase( 0 ); // a = [8]