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
- both arguments have same index processing rules as array.insert(), but with one difference - if both arguments are passed, after resolving (converting negative indices to positive ones, if there are any), first must be smaller than second
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]