Back to Freecodecamp

Step 50

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

latest759 B
Original Source

--description--

Now add a log statement to print the value of your call variable.

--hints--

You should add a console.log call.

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

You should log your call variable. Don't forget the semicolon.

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

--seed--

--seed-contents--

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

--fcc-editable-region--
function padRow() {

}
const call = padRow();

--fcc-editable-region--


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

let result = ""

for (const row of rows) {
  result = result + row + "\n";
}

console.log(result);