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.
I am not a JS person so I might be wrong, but doesn't it create two, or even three arrays? IMO best practice would be to create just one array (the one which should be filled in). Where am I wrong?
It's not about the language. Anonymous functions in JavaScript implicitly return whatever you put in them, and "the sum of 2 numbers" is equivalent to "the variable storing the result of summing 2 numbers". The same behavior is present in some other languages too (Python, Ruby etc.).
This comment is hidden because it contains spoiler information about the solution
works either way, welcome to js