Conteúdo do Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: Creating an Object
Task
Create a JavaScript object called informationCard
representing basic personal information. Inside this object, include a nested object with contact details, such as a home address and phone number. The object should have the following structure:
Information card (outer object):
- First Name (e.g.,
"Alice"
); - Last Name (e.g.,
"Smith"
); - Age (e.g.,
25
); - Contact Details (nested object).
Contact Details (nested object):
- Home Address (e.g.,
"123 Main St, Apt 4B"
); - Phone Number (e.g.,
"555-123-4567"
).
Note
In this challenge, nothing will be output in the console after clicking 'Run Code' as we don't
console.log()
anything.
- Use an object literal to define the outer object.
- Inside the outer object, create a property called
contactDetails
and assign it a nested object. - Inside the nested object, add the necessary properties.
- You can fill in any data.
Tudo estava claro?
Conteúdo do Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: Creating an Object
Task
Create a JavaScript object called informationCard
representing basic personal information. Inside this object, include a nested object with contact details, such as a home address and phone number. The object should have the following structure:
Information card (outer object):
- First Name (e.g.,
"Alice"
); - Last Name (e.g.,
"Smith"
); - Age (e.g.,
25
); - Contact Details (nested object).
Contact Details (nested object):
- Home Address (e.g.,
"123 Main St, Apt 4B"
); - Phone Number (e.g.,
"555-123-4567"
).
Note
In this challenge, nothing will be output in the console after clicking 'Run Code' as we don't
console.log()
anything.
- Use an object literal to define the outer object.
- Inside the outer object, create a property called
contactDetails
and assign it a nested object. - Inside the nested object, add the necessary properties.
- You can fill in any data.
Tudo estava claro?