"Implement a function, which takes a non-negative integer"
So non-negative is assumed already. In production code this obviously would want some additional robustness, but based on the description of the task the solution fits.
The tests pass, and those are the final say anyway.
very nice!
Okay, my bad, thank you for your reply. :)
In the task description:
"Implement a function, which takes a non-negative integer"
So non-negative is assumed already. In production code this obviously would want some additional robustness, but based on the description of the task the solution fits.
The tests pass, and those are the final say anyway.
Werent we supossed to check if there is a negative number? Because I can't see it in this code¨.
my original code is
sortGiftCode = (code) ->
code
.split ''
.sort ''
.join ''
plz upgrade coffee to 1.7