d at domenic.me (2015-02-13T23:25:10.008Z)
I am reading the Symbol section of the ES6 spec (19.4), and my understanding is that calling the Symbol constructor does *not* add an entry to the GlobalSymbolRegistry. Is that correct?
For example:
```js
var s1 = Symbol("foo");
var s2 = Symbol.for("foo");
```
In this example, s1 and s2 would be two distinct symbols. And in the following example:
```js
var s1 = Symbol("foo");
var s2 = Symbol.keyFor(s1);
```
In this example, s2 would be undefined.
Am I understanding correctly?
Hi, I am reading the Symbol section of the ES6 spec (19.4), and my understanding is that calling the Symbol constructor does *not* add an entry to the GlobalSymbolRegistry. Is that correct? For example: var s1 = Symbol("foo"); var s2 = Symbol.for("foo"); In this example, s1 and s2 would be two distinct symbols. And in the following example: var s1 = Symbol("foo"); var s2 = Symbol.keyFor(s1); In this example, s2 would be undefined. Am I understanding correctly? Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150122/d9e52c01/attachment.html>