using ECMA6 Set as object key

后端 未结 0 2078
终归单人心
终归单人心 2021-02-20 15:50

Is there a way to use Set as object keys

x = {}

a = new Set([3, 5])

x[a] = 1

x

{[object Se

相关标签:
回答
  • 消灭零回复
提交回复
热议问题