Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Tell us what’s happening:

I have set it up to look like the example with the correct information up to current in the task. But, should i be substituting the names for numbers? I have altered in multiple times to see if I am mixing up variables in the set up. right now it seems unclear.

Your code so far

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

// User Editable Region

let rows = ["Naomi","Quincy","CamperChan"];
rows[CamperChan] = 10;
console.log(rows);

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

you don’t need a 2nd declaration of the rows array. The first declaration already created the rows array with 3 values in it.

To access elements in the array you should use bracket notation like rows[0] for the first value, rows[1] for the second value etc.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.