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 would suggest adding what you wrote: "Empty sum gives 0, no sum gives -1" or what you wrote in another reply: "[-1,-1] returns 0. [] returns -1". I understand your reasoning I'm just hoping to clear things up for beginners.
Cosnider revising this sentence:
"The task is to return the maximum sum of the elements located between two negative elements, or -1, Nothing, or a similar empty value, if there is no such sum."
It is unclear as to when to return -1 versus returning 0. For a 7kyu I feel this info should be stated explicitly. Otherwise great qustion I enjoyed it!
Codewars runs an older version of node that doesn't support some modern JS methods. Could be why.
Are you running it in node via VScode or in browser?
This comment is hidden because it contains spoiler information about the solution