Back to Freecodecamp

Step 39

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

latest796 B
Original Source

--description--

Unfortunately, now you cannot see what your loop is doing.

Use let to declare a result variable, and assign it an empty string. An empty string is represented by quotation marks with nothing between them, such as "".

--hints--

You should declare a result variable.

js
assert.match(__helpers.removeJSComments(code), /result/);

You should use let to declare your result variable.

js
assert.match(__helpers.removeJSComments(code), /let\s+result/);

Your result variable should be an empty string.

js
assert.equal(result, "");

--seed--

--seed-contents--

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

for (let i = 0; i < count; i = i + 1) {
  rows.push(i);
}

--fcc-editable-region--

--fcc-editable-region--