1. The role of arrays
Bulk processing of data
2. Declaring an array
var arr=[element 1, Element 2, Element 3 ...]//Express Declaration
ARR[1]//Invoke element
var arr=new array (element 1, Element 2, element 3);//declaration using Array Object mode
3. Iterating through an array
For loop
4. Array processing functions
. length//array Length (properties)
. Sort ()//Sort (can have callback function)
. push ()//Add elements (into the stack) after the array
. Pop ()//The element after the divisor group (out of stack \ stack is LIFO)
. Unshift ()//Add elements in front of the array (into the queue)
. Shift ()//Remove the elements in front of the divisor group (out of queue \ queue for FIFO)
. Join ()//concatenate the array into a string using the passed-in connector
. Splice ()//Remove an element
. toString ()//The string representation of the returned object (available for all object types)
@zhnoah
Source: http://www.cnblogs.com/zhnoah/
This article is owned by me and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original
The right to pursue legal liability.
JavaScript learning note--4. Arrays