Symbol
Symbol
概述
let s = Symbol();
let s1 = Symbol('foo');
console.log(s);
console.log(s1);
//Symbol()
//Symbol(ew)
typeof s
typeof s1
// "symbol"
// "symbol"作为属性名的Symbol
属性名遍历
Symbol.for(),Symbol.keyFor()
Last updated