JavaScript Algorithms and Data Structures : Building a Pyramid generator:step64

Now it is time for a bit of math. Consider a three-row pyramid. If we want it centered, it would look something like:

··#··
·###·
#####

Empty spaces have been replaced with interpuncts, or middle dots, for readability. If you extrapolate the pattern, you can see that the spaces at the beginning and end of a row follow a pattern.

Update your blank space strings to be repeated rowCount - rowNumber times.

Open up the console to see the result.

function padRow(rowNumber, rowCount) {
return character.repeat(rowCount-rowNumber) + character.repeat(rowNumber) + character.repeat(rowCount-rowNumber);
}

If you have a question about a specific challenge as it relates to your written code for that challenge need some help, click the Ask for Help button. This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Welcome to the forum @balatamna16

The instruction given.

Update your blank space strings to be repeated rowCount - rowNumber times.

The error message.

You should call .repeat() on your " " strings to repeat them rowCount - rowNumber times.

For this step only modify the strings.

For next time, describe the issue in your own words. Learning to communicate problems is a part of becoming a web developer.

Happy coding