Ad
  • Default User Avatar

    My error is slightly different ("expected 1 to equal +0"). Maybe i'm not framing my question correctly. Can you explain why assert.strictEqual(findUniq([0, 0, 1 ]), 0) should equal 0 and not 1? My code is returning 1 which I understand but how is this not correct?

  • Default User Avatar

    NunoOliveira, could you elaborate on how the unique value is still expected to be zero even when there are multiple of those values?

  • Custom User Avatar
    1. Please provide complete code, correctly marked up and spoilered.
    2. Please don't rely on testing in some webbrowser when the JavaScript version in use on CW is Node, and not any webbrowser's. Test in Node ( and preferably the correct version for the kata ).
    3. "This .. checks .. not alphabetic"; "It check[s] .. non letter"; you are agreeing with him - what is the problem?
  • Default User Avatar

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

  • Custom User Avatar

    It's better to provide a complete code and correct code, otherwise one needs to guess what's missing.

    This only checks if one of a or b is not alphabetic, which is the condition for returning -1.

  • Default User Avatar

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

  • Custom User Avatar

    I totally agree. Once I started writing the steps down, I realized it was far less complicated then I initially thought.

  • Default User Avatar

    Slightly trickier than the usual level 8. Hint: One line... Don't overthink.