Learn Introductory JavaScript by Building a Pyramid Generator - Step 61

Tell us what’s happening:

Is there something wrong with my syntax here? It won’t pass.

function padRow(rowNumber, rowCount) {
return “\n” + character.repeat(rowNumber) + “\n”
}

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help 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.

1 Like

Hi @marciannimal

Use the addition operator to concatenate a blank space " " to the beginning and end of your repeated character string.

Your code is inserting a new line instead of a space.

Happy coding

1 Like