Hi there,
I’m stuck on this one. Here’s my code:
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
const test = "Testing";
return character + name;
}
console.log(test);
const call = padRow("CamperChan");
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);
and this is the output:
// running tests
Your function should declare a test variable.
You should initialise test with the value "Testing". Don't forget the semicolon.
Your test variable should come before your return keyword.
// tests completed
// console output
ReferenceError: test is not defined
What am I doing wrong?
Regards,
Devin M