Learn Introductory JavaScript by Building a Pyramid Generator - Step 21

Tell us what’s happening:

I can’t find the solution to this problem . it say bracket array but all of my brackets are identical to the example

Your code so far

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

// User Editable Region

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

// 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

Hi @boomsquadcorp

You have a syntax error.

image

Your code already declared the rows array. Please remove the second one, so debugging can continue.

Happy coding

.now it says " You should use bracket notation on the rows array again. "

Hi there!

Post your updated code here.

rows[2] = 10;

console.log(rows[2]); // prints [0,1,10]

Use three back ticks (```) on a separate line before and after your code here in the post.

1 Like

You should print the full rows array, not just the element at index 2

‘’’ rows[2] = 10;

console.log(rows[2]); // prints [“Naomi”,“Quincy”,10]‘’’

like this

You are not printing the rows array. You did not fix the error I pointed out.

1 Like

Hi!

Currently you are printed the third element of the rows array. You need to print whole rows array.

ahhh I see thanks for the help

1 Like

got it thanks for the help man

1 Like