Follow

Let's talk JS Symbols for a sec.

If you define a Symbol property on an object, it's enumerable, by default.

Except that when you try to enumerate it... you can't. It won't show up. Because EnumerateObjectProperties only iterates over String properties. ecma-international.org/ecma-26

The exception here appears to be Object.assign, which will copy any enumerable property.

I don't understand the logic here. Why does it work this way?

Sign in to participate in the conversation
Life raft.

Ceejbot's mastodon instance. This is an overprovisioned, personally-run instance running on AWS. I welcome friends to create accounts here. I intend to run it as long as people are using it.