array.resize [method]
array.resize( int size )
changes the size of the array, returns the array for chaining
size
must be larger than or equal to 0- if previous size was less than passed to the method, null variables are appended
- if previous size was more than passed to the method, items are popped from the end of the array
- if size was not changed, nothing else will change
a = [ 5, 6, 7 ]; a.resize( 5 ); // a = [5,6,7,null,null] a.resize( 2 ); // a = [5,6]