Knowledge Point (e)

First, the array operations

1, each array can store any type of data, the array size can be dynamically adjusted

2, length of the array is not read-only attribute. You can remove items from the end of the array by setting this property or add a new item

3, the detector array Array.isArray (value) whether it is an array

4, the conversion method colors.toString () colors.valueOf ()

5, a stack (LIFO) method POP () returns an array --- a final push () - pushing the end of the string array

6, the queue (FIFO) Shift Method () --- a first array and returns the item is removed, the array length minus 1 push () - an addition to the end of the array

7, reordering Sort () --- array in ascending order, the minimum value is located in the front, sort string comparison, the method will first call before the call tostring 

      Reverse () --- reverse order of the original array

8, the operation method slice ()

 

 

Guess you like

Origin www.cnblogs.com/huangqiao/p/11926560.html
Recommended