Learn Introductory JavaScript by Building a Pyramid Generator - Step 19

Tell us what’s happening:

It is telling me, “Use console.log and bracket notation to print the rows array.” I looked on the forum and it looks like step 19 was different then it is right now because they are talking about something different. Or im just not paying attention. Please help me with this!

Your code so far


// User Editable Region

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 19

Hi @accumbensmusic1

You have code which is causing a syntax error, so you need to remove the code on line 6.

image

Here is what the console.log is showing in the console.
image

You need to modify the console.log to display the first item in the rows array.

You can access the value using bracket notation, such as array[0] .

Happy coding

1 Like

Oh! That makes so much more sense. I was taking if from a completely different perspective. Thank you!

1 Like

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