Great post, Samantha!
Another case where I would personally use bracket notation is when the property name is odd - that alerts the reader that the properties in the object are non-standard!
user.firstName; // camelCase notation as usual.
user['first_name']; // underscore notation, using brackets to remark that the name is different!
Good example! Thanks for sharing that 👍
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.