11/28/2023 0 Comments Javascript object keysidentifiers + reserved words), a string literal, or a numeric literal. Looking at the ECMAScript spec grammar, we can see that a property name can be either an identifier name (i.e. When do they need to be quoted? When can the quotes be omitted? And in which cases can dot notation be used instead of bracket notation to get or set a property based on its name? Valid property names Intrigued by this, and having written about the similar topic of JavaScript identifiers before, I decided to look into valid property names in JavaScript. It may not be immediately obvious, but the real surprise here is that the Cthulhu-esque property name is not surrounded by quotes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |