Back to Freecodecamp

Step 62

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

latest915 B
Original Source

--description--

Because your function was no longer using the parameter, changing the argument did not affect it.

Go ahead and remove the test declaration and return statement from your padRow function, so the function is empty again.

--hints--

Your padRow function should not have a test variable.

js
assert.notMatch(padRow.toString(), /test/);

Your padRow function should not return a value.

js
assert.notMatch(padRow.toString(), /return/);

--seed--

--seed-contents--

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

--fcc-editable-region--
function padRow() {
  const test = "Testing";
  return test;
}
const call = padRow();
console.log(call);
--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);