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.
Because args passed to the spread is a list.
This comment is hidden because it contains spoiler information about the solution
We need that because one of the kata test cases calls
howManyLightsabersDoYouOwn()
, i.e. no function arguments. If we supply a default for name, then we don't have to worry about that case.I do not recall, since it's been a while since I've posted this solution, but I think that I just used the method template provided by the kata and have not changed the signature of the method myself.
It could be, that the kata has changed slightly since then.
Hmm why do we need any empty string as a default value for name here? Shouldn't it work without that?
I thought that inside functions you didn't need spaces around operators?