Files

1.2 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
660f1b6e60bd9edf902c81fd Step 36 1 step-36

--description--

Your iteration statement will tell your loop what to do with the iterator after each run.

When you reassign a variable, you can use the variable to reference the previous value before the reassignment. This allows you to do things like add three to an existing number. For example, bees = bees + 3; would increase the value of bees by three.

Use that syntax to replace your "iteration" string with a reassignment statement that increases i by one.

--hints--

You should add one to your i variable.

assert.match(__helpers.removeJSComments(code), /i\s*\+\s*1/);

You should assign i + 1 back to your i variable.

assert.match(__helpers.removeJSComments(code), /i\s*=\s*i\s*\+\s*1/);

Your for loop should increase i by 1 on each iteration.

assert.match(__helpers.removeJSComments(code), /for\s*\(\s*let\s+i\s*=\s*0;\s*i\s*<\s*count;\s*i\s*=\s*i\s*\+\s*1\s*\)/);

--seed--

--seed-contents--

const character = "#";
const count = 8;
const rows = [];

--fcc-editable-region--
for (let i = 0; i < count; "iteration") {

}
--fcc-editable-region--