Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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!

  • Custom User Avatar

    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?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution