Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

Tell us what’s happening:

// running tests
You should assign call the result of your padRow call.
// tests completed
// console output

#######
########

Your code so far

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

function padRow() {

}

// User Editable Region

padRow();
const call = "padRow";
padRow(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 + "\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/126.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

please click the reset button to restore the code to its initial state for this step.

Then, in the editor you will see this line of code:
padRow();

then we need to follow the instruction given:

declare a call variable and assign your existing padRow call to that variable

they want you to do this all in the same line as the line of code above.
Don’t add any new lines of code, just modify the one given to you.

1 Like

when I clicked on the reset button, it took me back to the very start of the entire assignment. Need to start all over again. Thank you

The reset button which is next to the check button only resets the current step. Thank you.

Reset just resets to the step that your on, it doesn’t take you back to step 1 of the project.

Is that what you mean?

If this is what happened, can you please provide a screenshot of all the boxes for the project on this screen:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8#learn-introductory-javascript-by-building-a-pyramid-generator

Thank you!

Is there any way to attach a screenshot here?

Yes. You can attached a screenshot with the icon that looks like a picture frame. :framed_picture: (but in monocolours)