Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
There's no such thing as self-documenting code.
Come down from your ivory tower. Code can be elegant, but a single function is not itself art.
A function, or even a library of functions, is a tool. Comments and documentation are how we explain to future users how best to implement whatever tool we've created.
Great comments <3
Test for "moose" expects
false
. Test for "moOse" expectsfalse
. Relevant assertions in tests are:Doesn't this mean they both behave the same way? What is different about them?
The tests expects false, I don't know what you're complaining about, the test is fine, you're wrong.
That is the test, if it would be case-sensitive as you claim, it would expect
true
becauseo
andO
would be considered different letters, but it isn't.Please reread what I wrote and re-check your tests. As many other users have pointed out, that test fails for them, as well. Case insensitization would mean that the case wouod be ignored, so MoOse and moose would be treated the same way. That isn't happening as it should be; it's not working as intended. Check your work.
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.
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:
moose
is not an isogram, because the lettero
occurs twice.mOose
is not an isogram, because the lettero
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?
There are absolutely ways to ignore casing here. Unfortunately, one of the tests written requires case sensitivity, so your function might be perfectly correct and still fail to clear this kata.
The instructions state that the function should be case INSENSITIVE, but one of the tests requires case sensitivity (i.e.: "MoOse === moose" // false;).
This comment is hidden because it contains spoiler information about the solution
Commenting your code would be helpful
That's understandable. However, BigInt has been widely supported for quite a while now, so the instructions for the Kata should probably be updated to explicitly state that BigInt is to be avoided in any solutions attempted.
I'm not sure if I should be proud of it to be honest... but I can't take it back now
This comment is hidden because it contains spoiler information about the solution