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.
.
Currently Codewars platform is experiencing issues. Please wait warmly :(
https://github.com/Codewars/codewars.com/issues/893
You're welcome. :-)
oh yea stupid me. thanks a lot!
Try "if (array == null)"
and "array.length < 3"!!!
An array of 2 without the highest and the lowest element has 0 elements! And so reduce cannot work!
i have the same issue. empty array should be filtered out in if statement but it give error
"TypeError: Reduce of empty array with no initial value at Array.reduce at sumArray"
Anyone can help? code as follow:
This comment is hidden because it contains spoiler information about the solution