Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Array Element Accessor | Mastering Arrays
course content

Зміст курсу

JavaScript Data Structures

Challenge: Array Element AccessorChallenge: Array Element Accessor

Task

  1. Create an array called stars with the following star names:
    • "Sirius";
    • "Alpha Centauri";
    • "Betelgeuse";
    • "Polaris".
  2. Log individual star names using different indices (0, 1, 2, and 3) using console.log

Expected output:

  1. Use square brackets [] to create an array.
  2. Separate each element with the comma ,.
  3. Use console.log() to log the value of the array element at the specified index.

Все було зрозуміло?

Секція 4. Розділ 2
course content

Зміст курсу

JavaScript Data Structures

Challenge: Array Element AccessorChallenge: Array Element Accessor

Task

  1. Create an array called stars with the following star names:
    • "Sirius";
    • "Alpha Centauri";
    • "Betelgeuse";
    • "Polaris".
  2. Log individual star names using different indices (0, 1, 2, and 3) using console.log

Expected output:

  1. Use square brackets [] to create an array.
  2. Separate each element with the comma ,.
  3. Use console.log() to log the value of the array element at the specified index.

Все було зрозуміло?

Секція 4. Розділ 2
some-alt