Why ES6 introduced classes yet `Symbol` not to be used with `new`?
oriol-bugzilla at hotmail.com
Sun Aug 14 22:58:28 UTC 2016
Probably, because symbols are primitive values, and constructors only create and initialize objects.
So you are supposed to call it as a function instead of as a a constructor.
That said, it might make sense for `new Symbol()` to return a symbol object. But instead, you can use
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss