JavaScript Array Methods

The Methods of JavaScript Array are as follows :

  • reverse() :  The reverse() method is used to reverse the element of an array. 
  • push() : The push() method is used to append the new elements in an array.
  • pop() : The pop() method is used to remove the last element from an array and also it returns that element. 
  • join() : The join() method is used to join all the elements of an array into a string. 
  • shift() : The shift() method is used to removes the first element from an array and return that element. 
  • splice() : The splice() method is used to changes the content of an array, adding nwe elements while removing old elements.
  • toString() : The toString() method converts an array to a comma separated string. 
  • concat() : The concat() method is used to create a new array by merging or concatenating existing arrays and return value is the length of array.
  • slice() : The slice() method is used to slice-out a section of array and and create a new array from it. 
  • sort() : The sort() method sorts the elements of an array.

Next Topic :