Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Tell us what’s happening:

It says you should use bracket notation on the rows array again.
what does that mean?

Your code so far

let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];
console.log(rows[0]);

// User Editable Region

rows[3] = 10;
console.log(rows[3]);

// 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/128.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

1 Like

It is zero based numbering so the first element in the array is 0, the second is 1, the third is 2.

The console should just log the variable name “rows”

Bracket notation is as you have done it in the first line of your code.

1 Like