Cursos /
JavaScript Data Structures
Challenge: Array Element Accessor
Task
- Create an array called
stars
with the following star names:- "Sirius";
- "Alpha Centauri";
- "Betelgeuse";
- "Polaris".
- Log individual star names using different indices (0, 1, 2, and 3) using
console.log
Expected output:
- Use square brackets
[]
to create an array. - Separate each element with the comma
,
. - Use
console.log()
to log the value of the array element at the specified index.
¿Todo estuvo claro?
Sección 4. Capítulo 2
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 Accessor
Task
- Create an array called
stars
with the following star names:- "Sirius";
- "Alpha Centauri";
- "Betelgeuse";
- "Polaris".
- Log individual star names using different indices (0, 1, 2, and 3) using
console.log
Expected output:
- Use square brackets
[]
to create an array. - Separate each element with the comma
,
. - Use
console.log()
to log the value of the array element at the specified index.
¿Todo estuvo claro?
Sección 4. Capítulo 2