Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

Tell us what’s happening:

how to “You should assign call the result of your padRow call”.?

Your code so far

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

function padRow() {

}

// User Editable Region

padRow(const call);

// 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; rv:133.0) Gecko/20100101 Firefox/133.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

here you are assigning 8 to count, you need to do something similar to assign the call to padRow to call

I still can’t do something similar

Hi there!

Post your updated code here in your next reply. Use three back ticks (```) on separate line before and after your code.

padRow(const call);

(''')

const call = 9;
padRow(call);

sorry i didn’t know backtick X(

You haven’t added the back ticks on a separate line before and after your code. You can use an option Preformatted Text </> in the reply setting. It will insert back ticks automatically, then you can add your code between the pair of Three back separately.

delete this part

why are you assigning 9 to call? you are asked to assign a call to the function to call

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Ohhh I see, thanks for the advice

Declare a constant call and assign it call to padRow function. You need to call the padRow function after assignment operator.

tho I should have the similar one like at the top, so I try to copy it and assign 9 to call :frowning:

const call = 9;
padRow(call) {
}

like this?

I’m really confused how to call the padRow function

you are calling it fine, you need to put this call in the right place, and not give call as argument

const call = 9;
padRow() {
  console.log(call);
}

is it right??I keep thinking :frowning:

no, the function already exist, do not try to define it again. function name and parentheses, and stop

you need to put the function call in place of the 9. the value of call has to be the output of the function

Then have I remove the padRow()?

const call = 9;
function call() {
  return();
}

did I still wrong?

yes… remove 9. It was an example, you should not assign 9 to call.

why are you creating a call function?

also no, you need to assign that call to the variable named call