Learn Introductory JavaScript by Building a Pyramid Generator - Step 61

Tell us what’s happening:

Trying to call my padRow function.
At least nothing worked and im confused.
Code where the Problem is, is marked with ( <-Problem is here!)

Your code so far

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

function padRow() {                    <-Problem is here!
  const call = "Testing";               <-Problem is here!
  return call;                                      <-Problem is here!
}

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);

Your browser information:

User Agent ist: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 61

Please click the reset button. This will restore the original code. You should not have erased the entire padRow function call.
And you should not have changed the test variable name.

The steps they want is to erase the name parameter and the two console log statements without changing anything else inside the function.
Then erase the string “CamperChan” and that is all.

Please try again.

1 Like


Thats the result?

No you erased the padRow function call again.

1 Like

ahh Got it!
Thanks haha :wink:

1 Like