I’m still getting an error on following code, what am I doing wrong in following code.
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
// User Editable Region
function addTwoNumbers(num1, num2) {
return num1 + num2;
}
const sum = addTwoNumbers(5,10);
console.log(sum);
// User Editable Region
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 + row + "\n";
}
//console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55
I am still getting an error after I fixed the syntax error.
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
// User Editable Region
function addTwoNumbers(num1, num2) {
return num1 + num2;
}
const sum = addTwoNumbers(5,10);
console.log(sum);
// User Editable Region
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 + row + "\n";
}
console.log(result)
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55
Not a specific error but when I try to run the code, I get this, “Sorry, your code does not pass. Keep trying.” Not sure if this is a glitch in the code checker. I followed the instruction and did exactly what it has asked for.