Learn Introductory JavaScript by Building a Pyramid Generator - Step 22

Tell us what’s happening:

You should use the .length property of your rows array.

Please help

Your code so far

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

// User Editable Region

rows[2] = 10;
array[array.length - 1] = rows;

// User Editable Region

console.log(rows);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 22

You have used the variable “array” from the example. Replace that with references to the “rows” variable in your code.

You also don’t need to leave in the original line of code as you are updating that.

Also delete “rows” after the equal sign. You were not asked to change what was already there. You can see from the first line of your code how it originally looked (but for the purposes of passing the step you need to delete it and work on the second line you have added.

Thanks a lot, java is a lot different from html :smile: :smile: :smile:

1 Like