Ad
  • Custom User Avatar

    Has nothing to do with throwing an exception vs throwing an error.

  • Custom User Avatar

    The jealousy is strong here, lol. 'c' can easily stand for 'carry over' as that is exactly what it is used for. 'a' and 'b' are provided by the person who designed the kata in the first place, so that parts settled. 'res' could stand for 'residue', or 'residual', or wth cares. What even is this?

  • Custom User Avatar

    The part that seems to be the crux is using remainders to compute a sum. I have never seen this. Very super duperly.

  • Custom User Avatar

    @C_Minor So you assume the wheel, as it was first invented by a man named Dunlop, is the best iteration of the wheel?

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Seems you're not going to get this through.

    The problem you've in your code is that arguments are never being used in the body of the function, and you are right that it works BUT it works because you've declared arrayA and arrayB to be global, it just don't care about the arguments(If you wanna verify this: pass "apple", "oranges" to the function, it would still work -- you get the idea I guess.)

    You should replace arrayA with a and arrayB with b.

  • Custom User Avatar

    In the call fuction, inside the console.log(). arrayA, and arrayB are passed in for a, and b respectively. arrayA, and arrayB are initialized at the top, and can be altered to match any test arrays.

  • Custom User Avatar

    @Justletmein, can you please tell us where do you think the arguments of the function a, b are being used?

  • Custom User Avatar

    How is it wrong lol? I just said it works. You can plug it into any IDE and it works. Who are you anyway?

  • Custom User Avatar

    Any salt you're tasting is surely your own tears.
    Fix your code instead of blaming everything else 🤣
    If you're unsure what's wrong then as a tip: don't state as a fact that it's right.
    I did however still point out the problem.

  • Custom User Avatar

    You can put in any the test input, and it works. 🤣 Why so salty?

  • Custom User Avatar

    your code completely ignores input, it does not work.
    when you test something locally you need to test the same thing as the tests test, otherwise the comparison is pointless.

  • Custom User Avatar

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