Ad
  • Default User Avatar

    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...

  • Custom User Avatar

    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!

  • Custom User Avatar

    Node 10.x should be enabled.

  • Custom User Avatar

    Some tests are still using expect. (JS)

  • Custom User Avatar

    Returning inconsistent data types is not a best practice.

    Consider throwing an Error or returning "NaN" instead of suddenly returning a Number instead of a String.

  • Custom User Avatar
    • Only trivial cases are tested: check
    • Basic misunderstanding of what 'exact' and 'without floating point errors' means: check
    • No randomly generated test cases: check
    • Close to being a duplicate of other "big number" kata: check (okay, others deal with integers, not decimals)

    This kata is bad in so many aspects I do not even. Unfortunately :(

  • Default User Avatar

    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 ^^

  • Custom User Avatar

    There are no actual random tests.

  • Default User Avatar

    The description says:

    If value is out of scope toString will return ''.

    But the comment in the "Your solution" section says:

    //return string in binnary reprezentation or NaN if entered value is out of scope
    

    The comment is wrong, since the tests check for an empty string, not NaN.

  • Default User Avatar

    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 return false instead of 0, but the way you're testing it doesn't differentiate between 0 and false.

  • Default User Avatar

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