I understand the differences between symbols and string based keys on object but somehow I am yet not clear why symbols exist.
In terms of non-enumerable properties we can have those with regular objects too. Like we have the length property with any array.
If we talk about sharing objects between libraries, I guess its a not a good idea where different libraries are trying to add properties with same key. If that is happening, probably we are doing something wrong somewhere.
It would be great if you could put out some real world examples where symbols are practically used.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I understand the differences between symbols and string based keys on object but somehow I am yet not clear why symbols exist.
In terms of non-enumerable properties we can have those with regular objects too. Like we have the length property with any array.
If we talk about sharing objects between libraries, I guess its a not a good idea where different libraries are trying to add properties with same key. If that is happening, probably we are doing something wrong somewhere.
It would be great if you could put out some real world examples where symbols are practically used.