Ad
  • Default User Avatar

    Kata details states that "if you pass it a value, it will return true if a value is a valid primitive number or Number object, and false if not."

    On the contrary, JavaScript tests assert that strings representing numbers, like "1" or "2", should return true. Strings are either number primitives or Number objects, so one or the other is wrong.

  • Default User Avatar

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

  • Default User Avatar

    I know, that's why it's a suggestion, Ü

    IMO, sample tests should cover at least what the description of the challenge states to be really useful. I've seen people going straight to [attempt] their solutions instead of using the sample tests for this same reason. And I think that's a pitty.

    I'm ok with complex or edge cases being in the full test suite, though.

    Thanks for your time!

  • Custom User Avatar

    That solution is wrong and doesn't do this:

    Complete the function scramble(str1, str2) that returns true if a portion of str1 characters can be rearranged to match str2

    That being said, that test could be added. Note that sample tests are just that, a sample, they shouldn't cover every possible test case, that's what the full test suite does.

  • Default User Avatar

    Killers don't come back to the crime scene. Heroes do.

    Pretty clever your monkey-patching, thanks for sharing!

  • Default User Avatar

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