Learn Introductory JavaScript by Building a Pyramid Generator - Step 17

Tell us what’s happening:

Finding it difficult to move from step 17 on the javascript algorithms and data structures, learn introduction to js by building a pyramid generator

Your code so far


// User Editable Region

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


// 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/116.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 17

Your console.log syntax is not correct, you’re missing some brackets. Also, you formed an array when you nested the array variable in the square brackets, this is not what the lesson requires. Lastly, you’re not supposed to use the array variable to access the array items, you’re supposed to use the rows variable, you do not have an array variable in your code, and you cannot use an array you’ve not formed.

1 Like

Thank you very much, this was very helpful @stephenmutheu

1 Like

You’re very welcome. Keep doing the good work.