Course Content
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: Iteration with for...of
Task
You are given an array of objects. Each object represents a friend's information. The task is to create a for...of
loop to iterate through the array and add one more property to each object that should be: online: false
.
- Use a
for...of
loop to iterate through thefriends
array. - Inside the
for...of
loop, use the dot notation to add the property.
Expected Output:
- To create a
for...of
loop, use the following syntax:for (const element of array) { ... }
. - Use the dot notation (
.
) to add a property (online
) and assign it the valuefalse
.
Everything was clear?
Section 4. Chapter 8
Course Content
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: Iteration with for...of
Task
You are given an array of objects. Each object represents a friend's information. The task is to create a for...of
loop to iterate through the array and add one more property to each object that should be: online: false
.
- Use a
for...of
loop to iterate through thefriends
array. - Inside the
for...of
loop, use the dot notation to add the property.
Expected Output:
- To create a
for...of
loop, use the following syntax:for (const element of array) { ... }
. - Use the dot notation (
.
) to add a property (online
) and assign it the valuefalse
.
Everything was clear?
Section 4. Chapter 8