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!
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!
Good example! Thanks for sharing that đź‘Ť