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: Merging Objects and Adding Properties
Task
Create a script that performs the following tasks:
- Merge the properties of two objects,
personInfo
andjobInfo
, and store them in a new object namedfullInfo
. - Add a new property to the
fullInfo
object namedisRetired
with a value offalse
. - Use a
for...in
loop to iterate throughfullInfo
, and log each property and its corresponding value in the format:[property]: [value]
.
Expected output:
- Use the spread operator (
{ ... }
) to merge properties frompersonInfo
andjobInfo
intofullInfo
. - After merging, add a new property to
fullInfo
. - Iterate through
fullInfo
using afor...in
loop to log the properties and their values.
Tudo estava claro?
Seção 3. 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: Merging Objects and Adding Properties
Task
Create a script that performs the following tasks:
- Merge the properties of two objects,
personInfo
andjobInfo
, and store them in a new object namedfullInfo
. - Add a new property to the
fullInfo
object namedisRetired
with a value offalse
. - Use a
for...in
loop to iterate throughfullInfo
, and log each property and its corresponding value in the format:[property]: [value]
.
Expected output:
- Use the spread operator (
{ ... }
) to merge properties frompersonInfo
andjobInfo
intofullInfo
. - After merging, add a new property to
fullInfo
. - Iterate through
fullInfo
using afor...in
loop to log the properties and their values.
Tudo estava claro?
Seção 3. Capítulo 6