Level 67 Level 69
Level 68

[No Typing] Array Methods


13 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
arrayName.toString();
converts an array to a string
arrayName.join(separator);
joins all array elements into a string with a specified separator
arrayName.pop();
removes the last element from an array
arrayName.shift();
removes the first array element and "shifts" all other elements to a lower index
arrayName.unshift(new);
adds a new element to an array (at the beginning), and "unshifts" older elements
delete arrayName[x];
Deleting Elements
arrayName.splice(index, count, new);
used to add new items to an array
arrayName.sort();
sorts an array alphabetically
arrayName.reverse();
reverses the elements in an array
arrayName.sort(function(a, b) {returns a-b});
sorts numbers in an array
array1.concat(array2);
creates a new array by concatenating two arrays
arrayName.slice(start, end)
slices out a piece of an array into a new array
arrayName.valueOf();
converts an array to a primitive value