Files

1.1 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
6610c105bbdacc114d6cdc44 Step 48 1 step-48

--description--

In order to use a function, you need to call it. A function call tells your application to run the code from the function wherever you choose to call it. The syntax for a function call is the function name followed by parentheses. For example, this code defines and calls a test function.

function test() {

}
test();

Call your padRow function.

--hints--

You should call the padRow function.

assert.lengthOf(__helpers.removeJSComments(code).match(/padRow\(\)/g), 2);

Your padRow function body should be empty.

assert.match(padRow.toString(), /\{\s*\}/);

--seed--

--seed-contents--

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

--fcc-editable-region--
function 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 + "\n" + row;
}

console.log(result);