Learn Introductory JavaScript by Building a Pyramid Generator - Step 20

Tell us what’s happening:

please where should i place my bracket notation in this code

Your code so far


// User Editable Region

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


// User Editable Region

Your browser information:

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 20

Hello @marvellousonu147 !

We need to create a new console.log below the existing one, and set it in the same way as the existing one.

Remember the first value is 0.

Wishing you good success on your coding journey. :slightly_smiling_face:

i have done that but it is still showing error

Please show your code for us to assist you?

Thanks and happy coding!

hi there!

you need to correct that console.log(). within the console you need to add the first value of the rows array. javascript index value starts from 0, so the first value of your array should be 0. use bracket notation to access the frist value of rows array within the console.log().

please can you give more explanation about what you just explained

the instrunction is asking you to add the first value of the rows array to the console using bracket notation. example: console.log(array[value])
Edit: rows is the array and 0 is the value, required for that challenge step.

i understand now, thank you

1 Like