JS bug report - Step 34 learn-introductory-javascript-by-building-a-pyramid-generator/step-34

Step 34 - Replace the string "iterator" with a let declaration for the variable i . Assign it the value 0 to start. This will give the i variable the value 0 the first time your loop runs.

The bug consists of passing and moving on to the next challenge even with incorrect code. See examples of incorrect code in the images below. I believe the loop forces this step to be completed.

try it;

for (let i = 0;) {
} /* the code will work even if it is wrong, the console will show a syntax error but it will pass */

works with this too

for (let i; ; ) {
}

i tried to post images so dont work, try the codes mentioned please

browser: Opera GX

Hello, I believe this is just a test example, because they just want to change the first expression and leave the rest. I don’t know of any instance of for loop with just an iterator or two to three strings for that matter.

1 Like

Nice, i was so focused on the wrong syntax and didn’t pay much attention around it…

1 Like