Ad
  • Custom User Avatar

    Sergio, this returns true when divisors x and y leave the same remainder, right?
    e.g. (11 % 2) == (11 % 5) // (1 == 1) true
    but 11 is divisible by neither 2 nor 5, and should return false.

  • Custom User Avatar

    Wanted to extend the idea of using default parameters. I wish I could keep the spread operator, but it must be the last, and default params are set left to right.

  • Custom User Avatar

    In case anybody misread like I did:
    "sum of the integers to the left of N is equal to the sum of the integers to the right of N"

    I interpreted this as sum of N from the left == sum of N from the right, and I couldn't understand why the first test failed on [1,...,1] which returns 0 (in my incorrect code).

    Read carefully!
    Thanks for the kata.

  • Custom User Avatar

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

  • Custom User Avatar

    Why not just return everything on the right side of the || operator? I don't understand what the comparison to !str gets you. Halp please.