Tell us what’s happening:
My for loop need to assign the text i + 1 but I can’t find the way to do it can someone help me .
Your code so far
const character = "#";
const count = 8;
const rows = [];
// User Editable Region
for (let i = i + 1; i < count; i + 1) {
}
// 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/138.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 36
ILM
2
you need to replace the “iteration” part, not the initialization
reset the step so that the code returns to be
for (let i = 0; i < count; "iteration") {
}
then you need to replace "iteration" with assigning a new value to i. Do you know what is used to assign a value to a variable?
yes I know .
i = i + 1; .
ILM
4
that is creating a new variable, how do you update the value of an existing variable?
1 Like
okay so it will be like this
i = i +1 ;
the code will be like this
for (let i = 0; i < count; i = i + 1) {
}
I trying it and see if I passed
ILM
Closed
9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.