Array Built-in Methods

The JavaScript Array object defines a number of methods you can use to work with arrays.

MethodDescriptionReturns
concat(<otherArray>) Concatenates the array with the specified array. Multiple arrays can be specified.Array
join(<separator>) Joins all of the elements in the array to form a string. The argument specifies the character used to delimit the items.string
pop()Treats an array like a stack, and removes and returns the last item in the array.object
push(<item>) Treats an array like a stack, and appends the specified item to the array.void
reverse()Reverses the order of the items in the array in place.Array
shift()Like pop, but operates on the first element in the array.object
slice(<start>,<end>) Returns a sub-array.Array
sort()Sorts the items in the array in place.Array
unshift(<item>) Like push, but inserts the new element at the start of the array.void
Home 
  JavaScript Book 
    Essential Types  

Array:
  1. The Array Type
  2. Array Built-in Methods
  3. Detecting Arrays
  4. Get and set array values
  5. Enumerating the Contents of an Array
  6. Array Length
  7. Array join() method
  8. Array concat()
  9. Array indexOf()
  10. Array lastIndexOf()
  11. Array every()
  12. Array filter() filters array with the given function.
  13. Array map()
  14. Array forEach()
  15. push() and pop():Array Stack Methods
  16. push(), shift():Array Queue Methods
  17. Array reduce()
  18. Array reduceRight()
  19. reverse():Reordering array
  20. Array slice()
  21. Array some()
  22. Array splice()
  23. Array sort()
  24. toString(), toLocaleString() and valueOf Array
  25. Array unshift()