Most elegant solution!
the for line can be shorter and the 2nd if could be s += " "
eval() is a dangerous function, which executes the code it's passed with the privileges of the caller.
question != suggestion
C# 8.0 in the wild
Nice use of the new range operator.
There's an assignment made in the IF statements instead of using the equality operator.
Here's a reference:
This comment is hidden because it contains spoiler information about the solution
Read this please: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
About your question, after a return, your function "ends" so your breaks are never reached.
Nothing we can do once it's been approved. Also that other kata is slightly different with input validation.
Hmm. Didn't think of using a logarithm. I just converted a number to a string and used it's length. Learned something new today.
this is how all CW kata works so no need to explicitly state that in every kata ~~