Learn
Objects
Accessing Properties
One way to access properties of an object is by using the dot notation. The dot notation is straightforward and concise, making it widely used in JavaScript.
Here is an example:
In the example above, we have an object called person
with three properties: name
, age
, and occupation
. We can access these properties using dot notation by appending the property name to the object name.
Instructions
1.
Print the value of the property name
from the person
object using dot notation.
Sign up to start coding
Already have an account?
Sign In
Course content