Es6 new Object array method

Disclaimer: If you have any objection to this article, then please write your comments in the article comments at. If you find this article interesting, please share and forward, or you can look at, you acknowledge and encouragement of our articles. Wish everyone in the programming this road, farther and farther. https://blog.csdn.net/weixin_44369568/article/details/91458117

Objects

Merge objects
Object.assign({},{})  
Compare two values ​​are exactly equal
Object.js()

eg:
Object.js(NaN,NaN);//true

value value

writable can write

enumerable enumerable

configurable configurable

Returning to the description of the attribute objects
Object.getOwnPropertyDescriptor(对象,该对象的属性)

get()

set()
It returns an array, the array to store all the key
Object.keys(对象)
It returns an array of arrays to store all values
Object.values(对象)
It returns an array array [key, values]
Object.entries(对象)
The array into an array of class
Array.from()
Array into a set of values
Array.of()
Modifying the original array
copywithin(要替换的下标,要复制的起始下标(可选参数)要复制的结束下标+1(数组length)))
We will modify the original array
Array.prototype.find
Find an array of matches, returns an array of matches
Find an array of first match, returns the array index matches
Array.prototype.findIndex
Filling the array will modify the original array
Array.prototype.fill()

Guess you like

Origin blog.csdn.net/weixin_44369568/article/details/91458117