...
// add(arr[0],arr[1],arr[2]) add.apply(null,arr);javascript
## 研究Object 1. 这是一个函数(类); 2. 该类身上有自身的方法还有原型的方法  1. `Object.create`参数一个对象(原型对象)去建立一个新的实例对象 2. `Object.defineProperty`和`Object.getOwnPropertyDescriptor`
Object.defineProperty(对象,要配置的属性名,配置对象) // 配置对象 // 数据属性 {value: 12, writable: true, enumerable: true, configurable: true} // 访问器属性 {get: ƒ, set: ƒ, enumerable: false, configurable: true} Object.getOwnPropertyDescriptor(对象,要查看的属性名); // 返回配置对象
3. `Object.defineProperties`和`Object.getOwnPropertyDescriptors` var obj = {a:1,b:2,c:3} Object.defineProperties(obj,{ a:{ value:0 }, b:{ value:0 }, c:{ value:0 } }) Object.getOwnPropertyDescriptors(obj); 4. `Object.entries` js var obj = {a:0,b:0,c:0} Object.entries(obj); // => [['a',0],['b',0],['c',0]] 5. `Object.freeze` `js var obj = {a:0,b:0,c:0} Object.freeze(obj); // 该方法让obj中的全部属性都不能够被修改 6. `Object.getOwnPropertyNames` ```js // 获取对象自身的全部属性名(字符串) var obj = {a:0,b:0,c:0} Object.getOwnPropertyNames(obj); // ['a','b','c']
/* for in 能够枚举到隐式原型的属性 */java
7. `Object.getOwnPropertySymbols`
// 若是对象的属性名是Symbol类型的话,那么for in将不能枚举到 var a = Symbol(); var obj = {[a]:1} Object.getOwnPropertySymbols(obj) // [Symbol值]