Ad
  • Default User Avatar

    All numbers in JavaScript are floating-point -- they are not completely accurate. Try a few different ways to round and you should be fine.

  • Default User Avatar

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

  • Custom User Avatar

    Yeah, be sure you are accouting for all the conditions in the details. The examples in the details helped me get through some missed conditions.

  • Default User Avatar

    Oh wait ... !

  • Default User Avatar

    I got over that error but now at the last test it says:

    Expected: false, instead got: NaN

  • Custom User Avatar

    Corrected my solution to return an integer as opposed to a string. If it is part of the challenge to require the return of an integer as opposed to a string, could you also put it in the details? Also, I read below that you updated the error messages to account for returning a string result when it expects a number however it was not working for my submissions. Just FYI.

  • Custom User Avatar

    My solution returns the expected value properly, however still receives an incorrect response. Here are two examples:
    Returned string - Expected: 7248.43, instead got: 7248.43
    Returned string - Expected: 11905.95, instead got: 11905.95

    It seems that all my tests also pass when using Test.assertSimilar while Test.assertEquals will mark my two place decimal responses as receiving what is not expected. I believe it may have something to do with the way I have truncated the return to two decimal places. Is it part of the challenge to return the expected number in a particular way or is this a bug?

  • Custom User Avatar

    Syntax error on my part. I have found my issue.

  • Custom User Avatar

    I had the same issue at first. You'll need to comb through the description to find what you missed. It has to do with the fine print around the effectiveness of type versus type.

  • Custom User Avatar

    So I have 10 success, 1 failed for reason: 'Value is not what was expected'. Finding it significantly hard to troubleshoot the issue due that providing extremely little in detail. At least the other errors returned expected value vs returned value and I was able to figure out what I forgot. Anyone able to point me in the right direction to proceed?