Do people write this as JS code because they know JSON? { "foo": 123 } But you don’t need quotes for identifier keys: { foo: 123 }
-
-
@mathias How about the following simple rule? If a key is an identifier, don’t quote it. Otherwise, quote it. -
@rauschma That’s inconsistent, and you can’t seriously expect everyone to learn the ES identifier rules by heart. - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.