javascript - 符号名称前的双 at 符号 (@@) 是什么意思

标签 javascript ecmascript-6

这个问题在这里已经有了答案:





What does @@ ("at at") mean in ES6 JavaScript?

(1 个回答)


5年前关闭。




在 ES6 符号的上下文中,经常看到双符号 (@@) 放在符号名称之前。它只是引用内置符号的另一种方式吗?但是,在代码中使用它会导致

SyntaxError: Invalid or unexpected token

最佳答案

之前已经回答过:What does @@ ("at at") mean in ES6 JavaScript?

我也要把这篇文章留在这里:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols

规范的摘要引用:

Well-known symbols are built-in Symbol values that are explicitly referenced by algorithms of this specification. They are typically used as the keys of properties whose values serve as extension points of a specification algorithm. Unless otherwise specified, well-known symbols values are shared by all Code Realms (8.2).



我希望这回答了你的问题 :)

关于javascript - 符号名称前的双 at 符号 (@@) 是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45291506/

相关文章:

javascript - RxJS 5 子类化 Observable - 静态方法返回父类的实例

javascript - 在 Google map 中动态更改信息窗口的内容

JavaScript ES6 转换复杂对象的更好方法

javascript - 在 Emberjs 中检查表单是否为空的正确方法

javascript - 禁用 HTML 表单中的选项卡

javascript - 我如何使 2 个函数在 jquery 中与 "or"同时工作?

javascript - 通过引用或复制导入 ES6 变量

javascript - 为什么递归生成器函数在 ES2015 中不起作用?

javascript - 在 Vanilla JS 中滚动到下一部分并返回到顶部而无需 ID - 无 JQUERY

javascript - 在 async 之外使用 await