Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

Tell us what’s happening:

i dont quite sure how to call my padRow. i dont know how and what to do

Your code so far

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

function padRow() {

}

// User Editable Region

padRow();
const call= "padRow"

// User 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 + 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/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

1 Like

Hi. Read the last instruction carefully. You have declared the variable and variable name correctly. The value of the variable has not been assigned your existing padRow function call. It didn’t ask you to add a string called padRow as the value.

You also need a semi colon after the variable declaration.

There should only be 1 line of code in the finished answer

hi thank you for replying. what ishould do next is remove the string and what else.

The value to put there is your “existing padRow function call”. Can you work out what that is? You have already written it.

please can you show me how to write it

You write the name of the function with () brackets next to it.

like this
const call;
function padRow();

The function name is just padRow.
The function call has () after the function name.

You had the first bit right: const call = . You need to add the value after the =, the variable value.

thank you
for your help

Hii Ashley . you should call your padRow() function inside of the variable call . like this padRow(); instead of calling you assigned "padRow "string to call variable.

1 Like

thank you it went through

1 Like

thanks for your help