Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Tell us what’s happening:

i dont understanding
let rows = [1, 2, 3];
rows[1] = 25;
rows[2] = 10;
console.log(rows); // prints [1, 25, 10]

Your code so far


// User Editable Region

let rows = [1, 2, 3];
rows[1] = 25;
rows[2] = 10;
console.log(rows); // prints [1, 25, 10]

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Hi welcome to the forum :wave:

Update the third element of your rows array to be the number 10. 2. Then print the rows array to your console.

There are two tasks here, and should take 2 lines of code:

  1. Update the third element of your rows array to be the number 10.
  2. Then print the rows array to your console.

These lines should be removed, they are not related to the instructions:

let rows = [1, 2, 3];
rows[1] = 25;

You copied these from the example code. Only write code that implements the instructions.