为什么我可以正确地将字符串添加到一个集合中?
第一个示例。 中写下字符串。
let set = new Set('Emily', 'Mag');
我不能仅在()
'mag'
在哪里?字符串是可以的,为什么不添加到集合?
First example. I can't add string just writing it in ()
.
let set = new Set('Emily', 'Mag');
Where's 'Mag'
? String is iterable, why doesn't it add to Set collection?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为语法有些关闭。您可能要寻找的是以下内容:
希望它有帮助!
I think the syntax is slightly off. What you might be looking for is the following:
Hope it helps!