Learn Introductory JavaScript by Building a Pyramid Generator - Step 18

Tell us what’s happening:

am having difficult figuring this out, can someone help me out?

Your code so far

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

// User Editable Region

rows["CamperChan"] = 10;
console.log(rows); // prints [0, 25, 10]

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 18

What exactly is the issue you are having?

how can l update the third rows array to the number 10 and then print the rows array to the console

how can l update the third element of my rows array to be the number 10. then print the rows array to my console?

you need to update the third element, not the element at index "CamperChan" . Remember that arrays are 0-indexed, that means that the first item is at index 0, the second item at index 1 and so on…

thank you, it has worked

1 Like