Ad
  • Custom User Avatar

    You're evaluating the number as you add it to your result, when you're supposedto evaluate the numbers when you return the result...

  • Custom User Avatar

    I'm going to makr this issue as resolved since you haven't responded to this issue.

  • Custom User Avatar

    I disagree that my output is wrong. We can Number(string.replace(/^[0-9]/g,'')), but that still gives us a value that is NOT achieving the stated goal of the Kata. The goal is to 'return ALL the numbers in the string in the order they occur,' emphasis mine. The solution checker does not do this. I will mark my newer issue as resolved, but I do not think this Kata is correct with the current goals or test cases.

    Either the test cases need to be fixed to actually meet the goal, or the goal needs to be changed to meet the test cases.

    I don't mean to be obstinant, and thank you for making the Kata, but we should not have people train on wrong outputs.

  • Custom User Avatar

    your outputs are wrong, basically your result calculation isn't just concatonating the number, the idea is to just remove all non number values and convert it to a number. Also please resolve your older issue because this is the same issue.

  • Custom User Avatar

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

  • Custom User Avatar

    I think you're overcomplicated it, you're supposed to return a number even if it is over the Max Safe Integer for Js, I know the precision is off but it shouldn't matter. The whole idea of the kata is to just filter out everything that's not a number. If you post your solution and mark it as a spoiler I can tell you where you went wrong.

  • Custom User Avatar

    This Kata will not work for JS with the current test cases:
    The max safe int is 2^52 or:
    9007199254740991
    Several test cases run well over that. This Kata does not accept stringoutputs and does not correctly test its own input for JavaScript. Please fix test cases for JS; even the testing program itself is broken, see below.


    Running a test to print out the input value and the output the automated test expects from us we get:
    Input:
    ae410d57182d3cb7cf41bbde0fd658f2
    Output tested for:
    41057182374106584
    Despite the fact that all of us can clearly see it should be:
    41057182374106582

    Another, more obvious test:
    Input Vale:
    db8d1b5149a0371b2b603095d969c1ac
    Just return the numbers - Expected:
    815149037126031000000

    Despite that it should clearly be
    815149037126030959691

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER