Another place bracket notation is useful is when you use a minifier. Minifiers can be configured to replace dot notation identifiers. This isn't an issue for most cases, but it is when you reference a DOM element's attributes. The value in the HTML will not get changed by minification so your references shouldn't either. Minifiers won't change strings so bracket notation using a string is how you can ensure DOM references work after minification.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Another place bracket notation is useful is when you use a minifier. Minifiers can be configured to replace dot notation identifiers. This isn't an issue for most cases, but it is when you reference a DOM element's attributes. The value in the HTML will not get changed by minification so your references shouldn't either. Minifiers won't change strings so bracket notation using a string is how you can ensure DOM references work after minification.