This comment is hidden because it contains spoiler information about the solution
Basically the line breaks serve to visually structure the final string, so there is no need for one at the end.
What was the reason for having the last line with no line break?
Please review and approve my translation thank you for the good Kata.
Here is the first sample test which shows an expected result having no trailing space. Following that, we can see the results of running your code which shows that you returned first, and then finally what is expected of the test. Your code is definitely producing a trailing \n, and the kata tests are correct.
Test.assert_equals(multi_table(5), '1 * 5 = 5\n2 * 5 = 10\n3 * 5 = 15\n4 * 5 = 20\n5 * 5 = 25\n6 * 5 = 30\n7 * 5 = 35\n8 * 5 = 40\n9 * 5 = 45\n10 * 5 = 50')
'1 * 5 = 5\n2 * 5 = 10\n3 * 5 = 15\n4 * 5 = 20\n5 * 5 = 25\n6 * 5 = 30\n7 * 5 = 35\n8 * 5 = 40\n9 * 5 = 45\n10 * 5 = 50\n'
'1 * 5 = 5\n2 * 5 = 10\n3 * 5 = 15\n4 * 5 = 20\n5 * 5 = 25\n6 * 5 = 30\n7 * 5 = 35\n8 * 5 = 40\n9 * 5 = 45\n10 * 5 = 50'
I am facing that same problem...
The expected result shows that the basic tests require the trailing '\n' to pass them. My code does not provide that. When I run my solution, it literally prints the exact result requested in the kata. Try it.
your function returnsundefined, it should return a string
if you look at your error messages they probably tell you this
Read this paragraph of FAQ.
With what you provided, no.
You can try providing input that fails, expected output and your output, OR provide your code.
tried all options but still same issue poping up...any suggestions?
Sure... Maybe check for trailing whitespace.
I am getting same as answer but still getting error but my solution and answer is the same as fuck ?