3 ms·
The original quote is "When accessing object properties that are determined at run-time or which contain characters not compatible with dot notation, use square
by asolove 15y ago
The original quote is "When accessing object properties that are determined at run-time or which contain characters not compatible with dot notation, use square bracket notation." To which should be added: object properties that are reserved words in the language.
The most common problem here is people using the dot notation for properties like "object.default" or "object.class" that are syntactically invalid.
The rest of the article is a strange mix of good advice and some cases of pretty-bad code being presented as better than very-bad code.