9-Javaweb learning -Array object methods ES6 some of the new functions

9-Javaweb learning -Array object methods ES6 some of the new functions

method description
concat() Connecting two or more arrays, and returns the result.
copyWithin() Another copy of the specified position in the array element of the array to the specified location.
entries() Return iterable array.
every() Whether each element of the detection element values ​​are eligible.
fill() Using the array to fill a fixed value.
filter() Sensed value element, and returns an array of all elements meet the conditions.
find() Returns the array element in line with the incoming test (function) conditions.
findIndex() Returns an array element index in line with the incoming test (function) conditions.
forEach() Each element in the array performs a callback function.
from() Create an array through a given object.
includes() An array comprising determining whether a specified value.
indexOf() Search for elements in the array and returns its location.
isArray() Determine whether an object is an array.
join() All the elements of the array into a string.
keys() Back iterables array, comprising an array of the original key (key).
lastIndexOf() Search elements in the array, and returns the last location it appears.
map() Through each array element specifies the processing function, and returns an array processed.
pop() Delete the last element of the array and returns the removed element.
push() Add one or more elements to the end of the array, and returns the new length.
reduce() The array element is calculated as a value (left to right).
reduceRight() The array element is calculated as a value (right to left).
reverse() Reverse the order of elements in the array.
shift() Removes and returns the first element of the array.
slice() Selecting a portion of the array, and returns a new array.
some() Are there elements that meet the specified condition detection array element.
sort() Of the elements of the array to be sorted.
splice() Add or remove elements from an array.
toString() Converting a string array, and returns the result.
unshift() Add one or more elements to the beginning of an array and returns the new length.
valueOf() Returns the original value of the array of objects.
发布了49 篇原创文章 · 获赞 9 · 访问量 1429

Guess you like

Origin blog.csdn.net/weixin_42401546/article/details/105185619