Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Accessing Object Properties | Objects Fundamentals
JavaScript Data Structures

Challenge: Accessing Object PropertiesChallenge: Accessing Object Properties

Task

You're given an object, user, representing a person's hobbies and interests. Your task is to access and retrieve specific details from the object.

  • Access and log the person's name.
  • Access the indoor hobby and log it to the console.
  • Store the person's age in a variable.
  • Access the favorite music genre and log it.

Expected output:

  1. Use dot notation to access properties within an object.
  2. To access properties within nested objects and arrays, chain the dot notation and square brackets (if needed).
  3. Use assignment with dot notation to store property values in variables.

Все було зрозуміло?

Секція 2. Розділ 6
course content

Зміст курсу

JavaScript Data Structures

Challenge: Accessing Object PropertiesChallenge: Accessing Object Properties

Task

You're given an object, user, representing a person's hobbies and interests. Your task is to access and retrieve specific details from the object.

  • Access and log the person's name.
  • Access the indoor hobby and log it to the console.
  • Store the person's age in a variable.
  • Access the favorite music genre and log it.

Expected output:

  1. Use dot notation to access properties within an object.
  2. To access properties within nested objects and arrays, chain the dot notation and square brackets (if needed).
  3. Use assignment with dot notation to store property values in variables.

Все було зрозуміло?

Секція 2. Розділ 6
some-alt