mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-23 12:03:28 -05:00
919 B
919 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 6610c424b7119919b62932f4 | Step 53 | 1 | step-53 |
--description--
A function does not have to return a hard-coded value. It can return the value stored in a variable. Parameters are special variables for a function, so they can also be returned.
Change your padRow function to return the name parameter directly.
--hints--
Your padRow function should return the value of the name parameter.
assert.equal(padRow("Naomi"), "Naomi");
--seed--
--seed-contents--
const character = "#";
const count = 8;
const rows = [];
--fcc-editable-region--
function padRow(name) {
return "Hello!";
}
--fcc-editable-region--
const call = padRow();
console.log(call);
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);