I am stuck on this step. The error message says I need to return the result of my .repeat() call. This is what I tried .
function padRow(rowNumber, rowCount)
{
character.repeat(rowNumber);
return rowNumber;
}
The instructions seem to suggest this is correct, and I have tried anything I can think of after the return keyword. I am sure I am missing something obvious. Can someone give me a gentle nudge?
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.
ok… i think i am just going to find a new project to work on. I am doing exactly as people suggest and exactly as the step suggests and getting no where. thanks anyway.
Why the reluctance to show your new code? It’s really the easiest way to help you and it’s really hard to help on any other projects if you don’t share code as you work on fixing
Please post your code, we can not help you without seeing your code.
rowNumber is a variable containing a number.
character is a variable containing a string.
.repeat() is a string method, it accepts a number as the argument for how many times it should repeat the string. It returns a new string.
You call .repeat() on the string assigned to the character variable, passing rowNumber as the argument to .repeat() specifying how many times the string should be repeated. It returns a new string, and that new string is what you return out of the function.