在ES6符號的上下文中,經常看到在符號名稱前放置了符號(@@
)處的雙重符號。它只是另一種引用內置符號的方式嗎?但是,使用它的代碼會導致符號名稱前的符號(@@)處的雙重含義是什麼
SyntaxError: Invalid or unexpected token
在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).
我希望這可以回答你的問題:)
如果問題是明確的重複,最好將其標記爲重複,並將其留在那裏。 https://meta.stackexchange.com/a/10844/220438 – loganfsmyth
riiiight,其實不知道,謝謝 – Max
你可以顯示一個前在你看到這個的地方充足了嗎? – Ibu