Contenido del 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: Array Element Modifier
Task
The task is to directly modify, check the length, and access specific elements within the array.
- Create an array called cities with the following city names:
- "Shanghai";
- "Sydney";
- "Toronto";
- "Frankfurt".
- Modify the city name at index 2 to "Miami" directly within the array.
- Log the length of the
cities
array usingconsole.log()
. - Retrieve and log the last city name in the array using
console.log()
.
Expected Output:
- Use square brackets
[]
to create an array. - Separate each element with the comma
,
. - Use
console.log()
to log the data. - Use square brackets
[]
within the element index to access the element and change its value. - Use the keyword
length
to get the array length.
¿Todo estuvo claro?
Sección 4. Capítulo 4
Contenido del 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: Array Element Modifier
Task
The task is to directly modify, check the length, and access specific elements within the array.
- Create an array called cities with the following city names:
- "Shanghai";
- "Sydney";
- "Toronto";
- "Frankfurt".
- Modify the city name at index 2 to "Miami" directly within the array.
- Log the length of the
cities
array usingconsole.log()
. - Retrieve and log the last city name in the array using
console.log()
.
Expected Output:
- Use square brackets
[]
to create an array. - Separate each element with the comma
,
. - Use
console.log()
to log the data. - Use square brackets
[]
within the element index to access the element and change its value. - Use the keyword
length
to get the array length.
¿Todo estuvo claro?
Sección 4. Capítulo 4