Show:

Defines a set of the possible operations over an array.

Item Index

Properties

add

Number final

Represents adding values to array.

 array.push(12);
 array.unshift(12);

remove

Number final

Represents removing values from array.

 array.pop();
 array.shift();

reverse

Number final

Represents reversing the element order in an array.

 array.reverse();

set

Number final

Represents setting a value to an index of an array.

 array[3] = 12;

setLength

Number final

Represents setting the length of an array.

 array.length = 5;

sort

Number final

Represents sorting the elements in an array.

 array.sort();

splice

Number final

Represents the powerful splice operation.

 array.splice(2, 3, 4, 15, 6);