L2L 2L
2014-10-10 05:06:26 UTC
I've played around with Symbol. And from my understanding, they are use to define unique properties and variable --I'm still not fully knowledgeable on them, only what I read. So if you would like to give your summary of them, please feel free.--.
My proposal is to be able to define an symbol object:
var obj = new Symbol("symbol obj");
Why?
To be able defined properties for objects with keys of symbol, as so:
var obj = {};
obj.propObj = new Symbol("propObj");
obj.propObj.prop = Symbol("prop");
This is doable via all constructor wrapper objects for all primitive data types.
It'll be a nice addition to this primitive type to have the same capability.
This is my proposal.
E-S4L
N-S4L
J-S4L
My proposal is to be able to define an symbol object:
var obj = new Symbol("symbol obj");
Why?
To be able defined properties for objects with keys of symbol, as so:
var obj = {};
obj.propObj = new Symbol("propObj");
obj.propObj.prop = Symbol("prop");
This is doable via all constructor wrapper objects for all primitive data types.
It'll be a nice addition to this primitive type to have the same capability.
This is my proposal.
E-S4L
N-S4L
J-S4L