Learn Introductory JavaScript by Building a Pyramid Generator - Step 22

Tell us what’s happening:

my code is not working
fineding it hard to solve it
rows[rows.lenght - 1]

Your code so far

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

// User Editable Region

rows[rows.lenght - 1];

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 22

Hi. You have a typo in one of your words.

You are also asked to update rows[2] to dynamically access the last array element. You are not updating rows[2]. I suggest you reset the code to get it back to how it was and try again.

1 Like

I got it right thanks

Hey guys how are you ?. I had started the pyramid challenge but i had to restart from step one, the reason I find java is bit complicated to understand, but not impossible. So far I understand That I am learning how every function or command work . but, the order in which you have to open a command and the functions with-in, don’t follow a sequence i can grasp. maybe because the key words don’t stand out or highlight like in html.
I am not sure if my question is clear. hope some one can explain. Thank you.

hi @isaac.martell, please open your own topic for your question!

You could find more clear if you go to the Full Stack Curriculum and learn JavaScript from there

also notice, Java and JavaScript are two different languages

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.