Ad
  • Custom User Avatar

    Why is the expected result for an empty string is an empty array, not an array with a single empty element? There's exactly one way to make an empty string - with zero elements. This choice is so irritating, it's not the first time I see this in a kata that has an empty string as a special case. An empty string usually should NOT be a special case actually. I think returning either [] or [[]] should be allowed for the sake of backwards compatibility, but it should've been only the second one, really. The description speficication of one or more is really weird to me, like why? This doesnt make any sense.

  • Custom User Avatar

    No tests, you can only try your solutions with attempts.
    More, same attempts one time may not pass due to CodeWars 12 seconds time exceed when other time be successful.

  • Custom User Avatar

    JavaScript sample tests throw an error while running. It looks like Test was not imported

  • Custom User Avatar
  • Custom User Avatar

    no sample tests

  • Custom User Avatar

    However, you should also be able to pass an optional third parameter, immediate, which, if truthy, will signify that the user wants the function to be executed on the leading edge of the interval

    // The first time, it will be logged immediately after the first call to myDebouncedFn()

    The "immediate" behaviour is very unclear.

    The current expected behaviour is to invoke the function inside debouncedFn immediately, which contradicts with the specs above and common sense. Being synchronously immediate rather than immediate at the next tick (as in setImmediate) is very different, and even lodash's debounce does the latter instead of the former.

  • Custom User Avatar

    Expected debounced function to accept same arguments as original function

    What? It's not mentioned in the description at all and it's not told how it should be handled.

  • Custom User Avatar

    A couple issues: