There are two ways to access the properties of an object:
- Dot Notation:
myObject.property. This is the preferred method because it is strict and removes ambiguity.
- Bracket Notation:
myObject['property']. This method receives a string value that matches the name of a property on the object. It is useful when you are unsure of the property name or need to pass it in dynamically.