Learn Introductory JavaScript by Building a Pyramid Generator - Step 20

Tell us what’s happening:

I didn’t understand how it works. like i already use square bracket but it does the same! please teach me, i really don’t understand (i’'m not native english so sometimes i don’t know the meaning)

Your code so far


// User Editable Region

let character = 'Hello';
let count = 8;
const row = ["Naomi", "Quincy", "CamperChan"];
let rows = row[0]
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/109.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 20

Hi and welcome to the forum.

This step is just asking you to add one line of code to log the first value in the row array. Therefore, please do not add two lines of code, just one.

In your attempt you tried to set the rows variable to be the value of row[0]

This is not going to work for this step because they didn’t ask you to create a new variable. They just want you to log the first value of the row array.

did we must use the const or not? i searched on google and i saw that we can use const, map(), etc.

You don’t need let or const or map.

You just need to use console.log

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