Do you know what a pure function is? Look it up if you don't.
If the solution to this kata were a pure function, it will clearly not work. Therefore...
You're asking for feedback and that's what you got, I don't see any hate in the previous comments. I'd add, add random tests, they're mandatory, have you read Kata authoring guide yet? https://docs.codewars.com/authoring
So any survivors know what to put on your gravestone?
Do you know what a pure function is? Look it up if you don't.
If the solution to this kata were a pure function, it will clearly not work. Therefore...
Yes, and you have to write your function so the argument is optional.
That's part of the task. Not a kata issue.
This comment is hidden because it contains spoiler information about the solution
You're asking for feedback and that's what you got, I don't see any hate in the previous comments. I'd add, add random tests, they're mandatory, have you read Kata authoring guide yet? https://docs.codewars.com/authoring