Learn Introductory JavaScript by Building a Pyramid Generator - Step 44

Tell us what’s happening:

You should no longer push your i variable.
You should push your character variable.

in here what is my character variable. I do not understand

Your code so far

const character = "#";
const count = 8;

// User Editable Region

const rows = [];

for (let i=0;i<count;i=i+1){
  rows.push(i)
 
}
 console.log(rows)


// 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 44

You defined the character variable in line 1 of the code in a previous step.

no through β€œ#” which is line 1 of the code is not solve the problem

post your updated code here.

that is the character variable above in your code.

you need to add that to your .push() method.

const character = β€œ#”;
const count = 8;
const rows = ;

for (let β€œ#”=0;β€œ#”<count;β€œ#”=β€œ#”+1){
rows.push(β€œ#”)

}
console.log(rows)

You should push your character variable.

after doing this they told me this.

why you add string "#" to your code everywhere?

I thought that it was my character. if it is string then what is my character variable? because they told me that I no longer push i variable I have to push character variable.

did you see a word character above in your code.? if yes, it is your character variable.

still it says You should push your character variable.
what I should push still I don’t get it

show your new code here .

I am really sorry. but what will be the code I do not get it.

for (let #=0;#<count;#=#+1){
rows.push(β€œ#”)
what should I write in # place ??

reset your code and add character to your existing row.push() only.

2 Likes

Thank you very much.

1 Like

your welcome. happy coding.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.