please i dont know how to call my pad row function
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(rowNumber, rowCount) {
return character.repeat(rowNumber);
}
// User Editable Region
for (let i = 0; i < count; i = i + 1) {
rows.push(function padRow);
}
// User Editable Region
let result = ""
for (const row of rows) {
result = result + "\n" + row;
}
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/128.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 66
If that wasn’t clear, try this one instead: there is explained what is a function and how to call it, you don’t even need to read it all, just arrive to where it explains how to call a function
here you are calling push, only you have teh wrong argument. Calling a function means putting the () near the name and eventual arguments. You need to call padRow without arguments. You don’t need the function keyword for that
This is a perfect example of what I meant in the other post: “Instructions and concepts should be clearer, especially on those certifications that are not fully translated …”; also with the last part of “not everyone has the same capability of fast understanding, nor the same competences” (most of us we’re on a basic if not completely null, level of coding, but we want to learn. But, if you start to make things too difficult to understand, the knowledge will also become boring. And that’s pedagogically proven!!)