题解 | JS24 Symbol
const _symbolKey = array => {
// 补全代码
const obj = {}
array.forEach(item=>{
obj[Symbol(item)] = item;
})
return obj;
}
const _symbolKey = array => {
// 补全代码
const obj = {}
array.forEach(item=>{
obj[Symbol(item)] = item;
})
return obj;
}
相关推荐