Cursos /
JavaScript Data Structures
Challenge: 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:
- Use dot notation to access properties within an object.
- To access properties within nested objects and arrays, chain the dot notation and square brackets (if needed).
- Use assignment with dot notation to store property values in variables.
Tudo estava claro?
Seção 2. Capítulo 6
Conteúdo do Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
Understanding ObjectsObject CreationNested PropertiesChallenge: Creating an ObjectAccessing Object PropertiesChallenge: Accessing Object PropertiesWorking with PropertiesChallenge: Modifying and Extending ObjectObject MethodsProperties in MethodsChallenge: Working with Object MethodsObject Fundamentals Sum Up
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: 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:
- Use dot notation to access properties within an object.
- To access properties within nested objects and arrays, chain the dot notation and square brackets (if needed).
- Use assignment with dot notation to store property values in variables.
Tudo estava claro?
Seção 2. Capítulo 6