Like this?:
function padRow(rowNumber, rowCount) {
return " ".repeat(rowCount - rowNumber) + character.repeat(rowNumber) + " ".repeat(rowCount - rowNumber);
}
Like this?:
function padRow(rowNumber, rowCount) {
return " ".repeat(rowCount - rowNumber) + character.repeat(rowNumber) + " ".repeat(rowCount - rowNumber);
}
that is a better one. What do the tests say?
I’ve edited your code for readability. 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.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
Its the first time, it actually says, nothing…
what do you mean? what do you see?
Before it said nothing. But I guess it works now. But why isn’t (rowCount - rowNumber) added to the character.repeat part
because it doesn’t match the number, you want only 1 character if you are at rowNumber of 1, if you use rowCount - rowNumber
it’s not 1
@im59138 But the next step doesn’t work the same way? (Step 70)
if you have questions about step 70 please open a topic for step 70
crea una variable = le pones los space.repeat y el resto de instrucciones, y luego lo llamas al principio y al final
code removed by moderator
this code is work
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.