Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Thank you for your help. But why, when [true] x11 and the XOR operation, do I get the error: “expected false to equal true”? I didn't change the initial data in any way.

  • Custom User Avatar

    ...That isn't how multi-input XOR works. it works like this:

    If at least one input is true, return true,
    EXCEPT if all inputs are true, then return false.

    in your case, all the inputs are true, which means that XOR will return false.

  • Custom User Avatar

    Can anyone explain to me why when [true, true, true], XOR = false?
    This is literally:
    (true XOR true) XOR true = false XOR true = true

  • Custom User Avatar

    it seems to have been fixed ?

  • Custom User Avatar

    Glad you got it! Congratz!

  • Custom User Avatar

    There was indeed an error in changing the original array. I have already fixed it myself. I did not know that such an error could occur here. Thanks for your help.

  • Custom User Avatar

    It would be much easier if the posted code used code formatting.

  • Custom User Avatar

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

  • Custom User Avatar

    Your solution fails because it mutates the input array, which the tests reuse to run the reference solution and construct the failure message.

    You should not mutate the input array, and test need to be fixed to not produce misleading output when you do.

  • Custom User Avatar

    I cannot reproduce this problem and test look rather OK. I think that the problem is somewhere in your solution but it's difficult to tell what is wrong without seeing your solution.

  • Custom User Avatar

    And I specifically check the response in console.log before return, and it's exactly as required in the assignment

  • Custom User Avatar

    Do I understand correctly that in randomized options I should give the answer in the form of numbers and dots? Or what is the error of my variant on the left as opposed to the proposed answer on the right?
    expected [ [ 'O', 'O' ], [ 'O', 'O' ], [ 'O', 'A' ], [ 'A', 'A' ], [ 'A', 'A' ], [ 'W', 'W' ], [ 'W', 'W' ], [ 'H', 'H' ], [ 'H', 'H' ], [ 'H', 'H' ] ] to deeply equal [ [ '0', '.' ], [ '8', '1' ], [ '0', '.' ], [ '8', '7' ], [ '1', '1' ], [ '0', '.' ], [ '8', '7' ], [ '0', '.' ], [ '8', '0' ], [ '.', '8' ], [ '1', '.' ], [ '3', '6' ], [ '0', '.' ], [ '8', '7' ], [ '1', '.' ], [ '3', '6' ], [ '1', '.' ], [ '3', '6' ], [ '0', '.' ], [ '8', '7' ], [ '1', '0' ], [ '.', '8' ], [ '0', '.' ], [ '8', '1' ], [ '.', '3' ], [ '6', '0' ], [ '.', '8' ], [ '7', '1' ], [ '.', '3' ], [ '6', '1' ], [ '.', '3' ] ]

  • Custom User Avatar

    There are bugs in your solution that are causing you to fail the random tests. Inspect the output and try to figure out where you're going wrong.

    The issue flag is for issues with the kata itself, not issues you're having solving it, so I'm resolving this one.

  • Custom User Avatar

    In random tests on JavaScript errors in the answers.