hi guys who can help me with step 40 of Java script
Your code so far
const character = "#";
const count = 8;
const rows = [];
for (let i = 0; i < count; i = i + 1) {
rows.push(i);
}
let result = ""
// User Editable Region
for(const value of rows) {};
// User Editable Region
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 40
hello sir,
tnx a lot but i need a little bit more clue
i saw this pattern on the link you sent me.
and wrote down some thing like that:
const rows =[‘0’,‘1’,‘2’];
for (const value of rows );{console.log(rows);}
but it was wrong
and the explanation for being wrong is " you should declare a row variable"
is nt this"const rows =[‘0’,‘1’,‘2’];" or this “let rows” declaring rows variable?!
best regard,
you mean the variables that provided in step 40
you mean this variables=( i = 0; i < count; i = i + 1)??
or i should use the row variable that provided in prior lessons like this:
“Naomi”, “Quincy”, “CamperChan” ???
Hi there, you seem to be quite confused about this step which is quite normal for someone new to programming. So may I suggest that you read the following page which talks about for loops with more examples. This should help you make progress I believe.
tnx
but really cant figure the answer when I write : for( const value of rows;){console.log(rows);}
it just tell me " you should declare rows variable"
but when i declare it like this : “const rows = [iterator,condition,iteration];” or this : "const rows = [Naomi,Quincy,Champer Chan]
or this const rows= [0,1,2,3,4,5,6,7],
it just told me you have already declared row variable!!!