Learn Introductory JavaScript by Building a Pyramid Generator - Step 18

Tell us what’s happening:

I am confused about print console log bracket notation

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;
console.log(rows[2] = 10);

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 18

The lesson wants you to print the rows array.

you don’t need bracket notation or assignment here

the only value inside your log statement should be the rows array

You will know you did it correctly if you see this in the console

[ 'Naomi', 'Quincy', 10 ]

Tell us what’s happening:

i am either not understanding or this is a computer error

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;
console.log(rows[2] = 10);

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 18

i tried it the way you said and it says its not correct.i am confused

It doesn’t look like you are printing the rows array here

what you are trying to do there is update the third element of the rows array inside the console.log

I have created an issue for this because you are not the first person to struggle with this step.

I urge to look at my proposed update to the directions with updates the code example to better help beginners what they are supposed to do.

hope that helps

thank you i figured out my error

Solution:

solution removed by moderator

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Mod Edit: SOLUTION REMOVED

This is the correct answer!!!

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

my problem is i am doing exactly what is said and nothing is working

Oh, I see the issue. The issue is that you did not do exactly what was said.

Can you post your latest code?

You should only have two new lines of code from the starting code

  • Update the third element of your rows array to be the number 10.
  • Then print the rows array to your console.

whats the code for step 18 ?? rows[2] = 10;
console.log(rows[2] = 10); that is what i have and it still says there should be a second console.log(); statement /… very confused when i put the second statement it just errors ,.

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 Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for 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.