Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
No, you were not, and that's unnecessarily strong language. If you must reflect with self-deprecation, let's say you were a no0b, just like any other beginner. And if as a beginner you passed the kata, great. And if as a beginner, you learned from others' code how to improve, GREAT, you got better. On principle I have upvoted your original comment, and welcome others to do the same to rectify this travesty of punishing what appears to me to be a beginner for asking a fair question.
This comment is hidden because it contains spoiler information about the solution
JavaScript is pretty much designed to give you some salvageable output in as many cases as possible rather than exceptions or errors. Unless you do something really wrong (like calling a method that doesn't exist), you can usually assume something like
undefined
,null
orNaN
will be returned, and/or that the language will silently handle edge cases for you (like slicing an array past its end). This answer happens to be a case where both things are happening.Lol, looking back on it now, I see that it's too much work.
Also, may I ask: where in this code is anything turned into a string?
This comment is hidden because it contains spoiler information about the solution