Back to Freecodecamp

Step 40

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

latest630 B
Original Source

--description--

Add a log statement to print the value of result. Depending on which console you use, you may not see anything printed.

--hints--

You should add a console.log call.

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

You should log your result variable.

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

--seed--

--seed-contents--

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

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

let result = ""

--fcc-editable-region--

--fcc-editable-region--