Ad
  • Custom User Avatar

    This is not even an issue with spec, the kata generates the expected answer before passing the argument to the user's function. In this case, the user is mutating the list as they iterate through it, causing issues. I'm closing this issue.

  • Custom User Avatar

    There is a false value in that input as well as [] (an empty array). The actual input for that test is ['a', 0, 0, 'b', null, 'c', 'd', 0, 1, false, 0, 1, 0, 3, [], 0, 1, 9, 0, 0, {}, 0, 0, 9].

    expected [ 'a', 'b', null, 'c', 'd', 1, 1, 3, 1, 9, {}, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ] to deeply equal [ 'a', 'b', null, 'c', 'd', 1, false, 1, 3, [], 1, 9, {}, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ] means that your code returned [ 'a', 'b', null, 'c', 'd', 1, 1, 3, 1, 9, {}, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ], but it should have returned [ 'a', 'b', null, 'c', 'd', 1, false, 1, 3, [], 1, 9, {}, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ]. The message you copied does not mention the input to the function.

    This problem is caused by a bug in your code. For future reference, the issue tag is meant to be used when there is a problem with the actual kata. You can use the question tag if you need help with your own code.

    As to the reason this is happening, make sure your code isn't confusing false and [] with 0. 0, false, and [] are all falsey values, so it seems like your code might be confusing them.

  • Custom User Avatar

    I think this testcase is wrong

    expected [ 'a', 'b', null, 'c', 'd', 1, 1, 3, 1, 9, {}, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ] to deeply equal [ 'a', 'b', null, 'c', 'd', 1, false, 1, 3, [], 1, 9, {}, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ]

    In the first array there is no 'false' however the second array has a false for some odd reason.
    There is also not a square bracket in the first array, however there is one in the second array. Can you help me out ?