Ad
  • Custom User Avatar

    Add this line in your code will kill the -0

    if(b==-0) b=0
    
  • Custom User Avatar

    It's problem about your code, not the kata, isn't it? ;-)

  • Default User Avatar

    I'm getting exactly the same problem. I tried other passed solutions and now they don't pass because of [-3,-0]

  • Custom User Avatar

    But why we got -0? It's not in the list.

  • Custom User Avatar

    I'm getting the same error in my tests. I wonder why this is happening when -0 === 0 returns true in javascript.

  • Custom User Avatar

    The tests are already inbuilt with the Kata. The tests you are looking at are the TDD example tests where you can make your own test cases and play around with different tests. You do not have to pass all these tests to complete and submit your solution - you only have to pass the "submit" buttons tests. Also, when you start a Kata with no example tests it should give a framework of how to write the tests.

    If you want to write your own tests or learn how to test if you're making a Kata, have a read of the Kata Test Framework which lists how to test for each language. This is not an issue so would you mind resolving the issue by replying and ticking "resolved". Cheers.