Better HN
topnewbestaskshowjobs
Log inSign up

ezpg

2 karma · joined May 5, 2017 (9y ago) · 1 submissions

Submissions

comment 9y ago · link · parent

Use Symbols instead of Strings: https://www.keithcirkel.co.uk/metaprogramming-in-es6-symbols...

See the second line of the code snippet under "Symbols are completely unique…"

Unless I have misunderstood the spec, to compare symbols you require both the reference and value. Much more preferable than passing around Strings.