mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-22 03:26:02 -05:00
1.1 KiB
1.1 KiB
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 660f1cedf3676fe26122ebf6 | Step 38 | 1 | step-38 |
--description--
You should see the numbers zero through seven printed in your console, one per line. This will serve as the foundation for generating your pyramid.
Replace your log statement with a statement to push i to your rows array.
--hints--
You should not have a console.log call.
assert.notMatch(__helpers.removeJSComments(code), /console/);
You should call .push() on your rows array.
assert.match(__helpers.removeJSComments(code), /rows\.push\(/);
You should push i to your rows array.
assert.match(__helpers.removeJSComments(code), /rows\.push\(\s*i\s*\)/);
Your .push() should happen in your for loop.
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*rows\.push\(\s*i\s*\);?\s*\}/)
--seed--
--seed-contents--
const character = "#";
const count = 8;
const rows = [];
--fcc-editable-region--
for (let i = 0; i < count; i = i + 1) {
console.log(i);
}
--fcc-editable-region--