Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Tell us what’s happening:

It says I should use the bracket notion on the rows array again. I went based off the example given, but it still says it isn’t correct. Can anyone lead me towards the right direction?

Your code so far

let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];

// User Editable Region

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

What do the instructions say?

[quote=“mkenzieb820, post:3, topic:697861, full:true”]
“Update the third element of your rows array to be the number 10 . Then print the rows array to your console” are the instructions I was given.

Ok. Remember that arrays are 0-based, so the first element is element [0]. Also the instructions are to print the rows array to your console, not the element

Okay, thank you! I managed to figure it out after remembering that, I appreciate the help:)

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