Ad
  • Default User Avatar

    Looks like you solved it in a way that may against the odds~~

  • Custom User Avatar

    It's specified in the description what to do with those values, so not an issue:

    Any values that fall out of that range must be rounded to the closest valid value.

  • Custom User Avatar

    It's passing the tests for me. Maybe you modified sample tests by accident? Try hitting the 'Attempt' button.

  • Custom User Avatar

    Not a kata issue. Multiple 'WUB's in a row should be replaced by only 1 space, not more, which is exactly what it says in the logs.

  • Custom User Avatar

    Hi, the tests are expecting javascript objects with no prototype. In your case, your objects have the Obj prototype. You could create the output objects using the litteral object syntax or use Object.assign/spread operator to copy your Obj properties into a basic literal object.

  • Custom User Avatar

    No, and please read that, (-1) * 3 * (-100) is 300, not -300 and 300 > 30

    If the array was instead: [[1,1],[2,3],[10,-100]] the answer would be 30 and not 300.

  • Custom User Avatar

    I am only using one loop

    Well, that's not correct, you have some loop-like methods (includes and indexOf) inside your loop so it won't work.

  • Default User Avatar

    ignore case means that uppercase A would count the same as lowercase a

  • Custom User Avatar

    The error tells you exactly what your problem is: TypeError: Reduce of empty array with no initial value. For some values of number your array is empty. Read about how reduce works or use a simple for loop instead. Please, delete the post below, there is no need for 3 posts about the same.

  • Custom User Avatar

    Not a kata issue, read this.