Valid javascript object property names

Yes, objects can be used as maps, and any string can be a property name. As you’ve discovered, some properties can only be accessed using the bracket syntax.

window['abc']

is accessing a property. It is not a variable, even though it refers to the same value (at the global level) as:

abc

Leave a Comment