Ad
  • Custom User Avatar

    Use console.log() to print your answer before returning

  • Custom User Avatar

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

  • Custom User Avatar

    When an array in the array is null or empty, the method should return 0 too!

    You're trying to read the length of null, that's what the error says. You have to check if it is an array first.

  • Custom User Avatar

    I really have no clue but I get the results below.
    I thought if you get all the assertions it's a full pass if someone could explain I would love it.
    I'm defintely trying to learn.

    KataTests
    Basic Tests (6 of 6 Assertions)
    Random Tests (40 of 40 Assertions)

    Test Passed: Value == 0 (<---Obviously just one of the passed tests but right below it is the error)
    TypeError: Cannot read property 'length' of null
    at getLengthOfMissingArray
    at /home/codewarrior/index.js:45:23
    at begin
    at it
    at /home/codewarrior/index.js:34:3
    at /runner/frameworks/javascript/cw-2.js:152:11
    at Promise._execute
    at Promise._resolveFromExecutor
    at new Promise
    at describe
    at /home/codewarrior/index.js:33:5
    at /home/codewarrior/index.js:81:5
    at Object.handleError

  • Custom User Avatar

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

  • Custom User Avatar

    In JavaScript I just floored seconds and it worked without any rounding. Had frustrated experience because of this "round it to nearest second".
    After reading issues section I confirmed what I suspected, author derped a bit here and refused to accept that.
    Some of the tests are mathematically incorrect.
    Edit: NVM, rounding down is not rounding, it is flooring.

  • Custom User Avatar

    For the race(80, 100, 40) I continue to get [1, 59, 59] instead of [2, 0, 0]. I'm using Javascript.
    If I use round in some places it works but then the other tests break.
    Not looking for the answer but I'm so close.