Back to Freecodecamp

Step 37

curriculum/challenges/english/blocks/learn-introductory-javascript-by-building-a-pyramid-generator/660f1bf673487ae0bb25b900.md

latest801 B
Original Source

--description--

Your loop should now run eight times. Inside the body of the loop, print the value of the i iterator and see what happens.

--hints--

You should use console.log().

js
assert.match(__helpers.removeJSComments(code), /console\.log/)

You should log the value of i.

js
assert.match(__helpers.removeJSComments(code), /console\.log\(\s*i\s*\)/);

You should log the value of i in your for loop.

js
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*\)\s*\{\s*console\.log\(\s*i\s*\);?\s*\}/);

--seed--

--seed-contents--

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

--fcc-editable-region--
for (let i = 0; i < count; i = i + 1) {

}
--fcc-editable-region--