JS

Objects in JavaScript - Accessing object propertie...

25.

Which of the following statements is true about accessing object properties in JavaScript?

You can only access object properties using dot notation.

You can only access object properties using square bracket notation.

Dot notation is preferred when the property name is dynamic or stored in a variable.

Square bracket notation is preferred when the property name is known beforehand.