Now let's take a look at a slightly more complex object. Object properties can be nested to an arbitrary depth, and their values can be any type of data supported by JavaScript, including arrays and even other objects.
userActivity has three properties: id, data, and data (value is an object with its nested structure). We can still use the same notations to access the information we need.
To assign the value 18 to the busy property of the nested onlineStatus object, we use dot notation to reference the property:
Top comments (0)