Ad
  • Custom User Avatar

    There are plenty of puzzle kata that do not explicitly tell you what to do. I wouldn't really call this a puzzle kata, but it could be seen in the same vein. Just looking at the sample tests should tell you all you really need to know about the kata anyway. We'll have to agree to disagree.

  • Custom User Avatar

    Eh, it's fine. You just have to think about it for more than a second. I see you solved it, so the instructions must have been good enough.

  • Custom User Avatar

    Thx! Good old days of fun programming.

  • Custom User Avatar

    so MoOse and moose would be treated the same way

    Test for "moose" expects false. Test for "moOse" expects false. Relevant assertions in tests are:

    assert.strictEqual( isIsogram("moose"), false );
    assert.strictEqual( isIsogram("moOse"), false, "same chars may not be same case" );
    

    Doesn't this mean they both behave the same way? What is different about them?

  • Custom User Avatar

    The tests expects false, I don't know what you're complaining about, the test is fine, you're wrong.

    assert.equal( isIsogram("moOse"), false, "same chars may not be same case" );
    

    That is the test, if it was case-sensitive as you claim, it would expect true because o and O would be considered different letters, but it isn't.

  • Custom User Avatar

    Please read the definition of case insensitive here: https://en.wikipedia.org/wiki/Case_sensitivity

    In case-insensitive, uppercase and lowercase letters are the same, and that's what the test asks.

  • Custom User Avatar

    I would appreciate some explanation from you why you consider my answers wrong, and what is the error in tests you are complaining about, because I think I am missing something:

    • The word moose is not an isogram, because the letter o occurs twice.
    • The word mOose is not an isogram, because the letter o occurs twice, with differend case (lowercase and uppercase).

    The occurrence of letters should be done in a case-insensitive way, i.e. both lowercase letters and uppercase letters contribute to the count of occurrences. And this is how it works in JavaScript translation. So, what exactly you think is wrong?

  • Custom User Avatar

    I'm not sure if I should be proud of it to be honest... but I can't take it back now