Conversion to String:
Str.split (","): divides a string into commas, returning an array;
Arr.join (","): Returns a string with all array elements separated by the specified delimiter, similar to ToString ();
These two methods are just the opposite.
The operation of the first-lowest array:
Arr.shift (): Removes and returns the first element;
Arr.unshift (a): Add a element at the first bit to return the length of the new array;
Arr.pop (): Removes and returns the last element;
Arr.push (a): Add a element at the last bit to return the length of the new array;
array element increment, delete, change:
Concat () connection array
var arr=[1,2,3,4]
Arr.concat (arr): return [1,2,3,4,1,2,3,4]; attach a copy of arr and arr, or Arr.concat (arr,arr2,..., Arrx);
Arr.concat (5,6): return [1,2,3,4,5,6];
Splice () splice an array, splice () at least two parameters (but the browser can also display a parameter)
Arr.splice (Index,howmany,ele1,ele2,...): Allows arr array to be deleted or added from the index position, delete howmany elements (all after the empty index is deleted), add Ele1,ele2 from the index bit ..., Returns the number of deleted arrays, but Arr becomes the new array, so the return value! = new arr:
Arr.splice (1) return [2,3,4];
Arr.splice [2,3], and a=[1,3,4];
Note: Distinguishing Arr.slice (), splice () will change the array, slice () will not, slice (1) return [3,4];slice] return [2], i.e. slice (star,end) but the returned arrays do not contain an end-bit element;
Explore JavaScript----common methods for arrays