Array An array of ten use

the first method

array toString ()

All elements of the array to convert a string;

 

The second method

array join ( "here is a delimiter")

This method can be elements of the array into a string, and the character string into other separators;

 

The third method

arr.concat (here variables)

It means for splicing a new variable arr placed tail;

 

The fourth method

arr.slice (start position, end position)

Array elements specified position for output, not the end itself;

 

The fifth method

arr.sort()

To sort an array of variables specified on what specific row, not clear

Estimate is based on a digital priority, followed by the uppercase letters, lowercase letters, Boolean

Sixth method

arr.reverse()

1 reversed data variables (elements);

 

Seventh method

arr.unshift("元素")

Increase at the beginning of the variable element of the array;

 

Eighth method

arr.shift()

Removes the first element, and returns that element is deleted

 

Ninth method

arr.push ( "fill in the specified element")

Adds the specified element to the end

A tenth method

arr.pop()

Removed the last of the array and returns

Eleventh method

arr.splice (delete where to start?, delete where?, what new?)

Above

Guess you like

Origin www.cnblogs.com/008ts/p/11391657.html
Recommended