1. Join ()
The Array.join method converts all elements in an array to strings and joins together, returning the last generated string
Example
var a=[1,2,3]
A.join (); ==> "the"
A.join ("") ==> "1 2 3"
The Array.join () method is an inverse operation of the String.Split method.
2, Reverse ()
The Array.reverse () method reverses the order of the elements in the array.
var a=[1,2,3]
A.reverse (). Join () = "3,2,1"
3. Sort ()
The Array.Sort () method sorts the elements in the vegetarian group and returns the sorted array.
4, Concat ()
The Array.concat () method creates and returns a new array whose elements include the elements of the original array called concat () and each parameter of concat ().
var a=[1,2,3];
A.concat (4,5) //return [1,2,3,4,5]
5, Slice ()
The Array.slice () method returns a fragment or sub-array of the specified array whose two parameters specify the start and end position of the fragment, respectively.
var a=[1,2,3,4,5]
A.slice (0,3) //return [+]
A.slice (3) //return [4,5]
A.slice (1,-1) //return [2,3,4]
6, Splice ()
The Array.splice () method is a common method of inserting or deleting elements in an array, unlike slice () and concat (), which splice () modifies the called Array.
Splice () can remove elements from an array, insert elements into an array, or work with a colleague to do both.
var a=[1,2,3,4,5,6,7,8]
A.splice (4); //return [5,6,7,8]; A is [1,2,3,4]
A.splice //Return [2,3];a is [1,4]
7. Push () and pop ()
The push () and Pop () methods allow arrays to be used as stacks.
Stack advanced after you know, do not list
8, Unshift () and Shift ()
The behavior of the Unshift () and Shift () methods is very similar to push () and pop (), unlike the fact that the former is an element in the head of the array rather than the tail.
Insert and delete operations.
9, ToString () and toLocaleString ()
That's not going to explain.
Several common methods of JavaScript arrays