3 ms·
Theoretically, if they were to add the ability to override equals they'd do it through symbols, but they haven't yet: https://developer.mozilla.org/en-US/docs/
by lolinder 3y ago
Theoretically, if they were to add the ability to override equals they'd do it through symbols, but they haven't yet:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#static_properties https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- leosanchez 3y agoYes. Symbols are the obvious ones. Symbols and sets both came with ES6? I believe. I wonder why they haven't implemented something like that.
- vlovich123 3y agoCouldn’t you polyfill your own Set implementation using Map<Symbol, Object> where the symbol is constructed how you need it from the object?