标签:object mic name concat logs yellow property 特性 obj
let fruit = { ‘2‘ : ‘mango‘, [Symbol.for(‘pink‘)] : ‘peach‘, ‘red‘ : ‘apple‘, ‘yellow‘ : ‘banana‘, [Symbol.for(‘purple‘)] : ‘grape‘, ‘1‘ : ‘Litchi‘ }; console.log(‘Reflect.ownKeys‘,Reflect.ownKeys(fruit)); console.log(‘Object.getOwnPropertyNames‘,Object.getOwnPropertyNames(fruit)); console.log(‘Object.getOwnPropertySymbols‘,Object.getOwnPropertySymbols(fruit)); console.log(Object.getOwnPropertyNames(fruit).concat(Object.getOwnPropertySymbols(fruit)));
标签:object mic name concat logs yellow property 特性 obj
原文地址:http://www.cnblogs.com/sea-breeze/p/7076224.html