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.
Was it specified somewhere in the description that the function was supposed to handle "more than 2 arguments"?..
No "big deal", but it was still a "surprise" at the moment of submitting the test, as:
-The description doesn't seem to explicitly mention that fact
-Worse: ALL examples in the description only use 2 arguments
-ALL the "Sample tests" only test for 2 arguments
Then only when submitting, we get the "surprise" Error message, about the function being expected to handle an arbitrary number of arguments...
Again, it just takes -at most- 1 or 2 extra lines to adapt the code, so a priori "no big deal" (so I'm not reporting this as an "issue"); but I think this "requirement" should be mentioned in the Description...
I am not sure what the problem exactly wants.
This is what I console.log() -ed
arr => two,six,five,seven,three,nine ..//.. value => three
and it returned [Should not find 'three']
There was also [not find element on 1st level] which I do not get at all. Does this mean I should not be looking for the value on the 1st level?
Thanks!
Node 10.x should be enabled.
Some tests are still using expect. (JS)
Returning inconsistent data types is not a best practice.
Consider throwing an
Error
or returning"NaN"
instead of suddenly returning aNumber
instead of aString
.This kata is bad in so many aspects I do not even. Unfortunately :(
What's the purpose of this kata?
Dealing with big float numbers, as I've initialy understood, or just avoiding floating point number precision errors?
Because there are only test cases for number in range of internal float representation, and some user's solutions only deal with them...
Anyway, the kata description doesn't specify the requirement about add function should be able to handle any numbers of arguments, test cases seems to not test for real NaN output (with Number.isNaN() method) and there's no test for none arguments provided, as well as no information about if the function should return NaN or '0' in this case ^^
There are no actual random tests.
The description says:
But the comment in the "Your solution" section says:
The comment is wrong, since the tests check for an empty string, not
NaN
.You don't clearly say what
bitIndex
means. Ordinarily it's counted starting from bit 0 which is the least significant bit, so your example would be incorrect: 00001011 has bit 0-1 = 1, bit 2 = 0, bit 3 = 1, bits 4-7 = 0.You also don't test it very thoroughly at all. You seem to expect that
getBit(8)
will returnfalse
instead of0
, but the way you're testing it doesn't differentiate between0
andfalse
.This comment is hidden because it contains spoiler information about the solution