7 ms·
The results are always Javascript literals. Javascript doesn't have symbols. So symbols are represented as strings starting with a single quote. Mildly confusin
by akkartik 6y ago
The results are always Javascript literals. Javascript doesn't have symbols. So symbols are represented as strings starting with a single quote. Mildly confusing but seems easy to pick up.
- fogus 6y agoAs mentioned, JS does have Symbols and I started the language using them but moved away. At the moment symbols are encoded as "'foo" but I may change the prefix to something less confusing at a glance.
- zeckalpha 6y agoJS does have Symbols but they are relatively modern: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...