External Publication
Visit Post

Every Key Is A String

Joe October 6, 2022
Source
I read a very interesting article today by Andres Reales about JavaScript object keys. I was previously under the impression that you could use numbers as object keys in JavaScript. Andres's article highlights why this is a misconception, and exposes the truth about JavaScript objects: every key is a string. All looks good until now... but here things get a bit odd You learn something every day. https://www.becomebetterprogrammer.com/can-javasscript-object-keys-be-numbers-or-non-string-values/

Discussion in the ATmosphere

Loading comments...