Ad
  • Custom User Avatar

    But what is exactly the questions here? The " 1234 5678 " is not a valid phone number (because of superfluous spaces), so the isValidHKPhoneNumber is expected to return false. However, it contains a valid phone number somewhere inside, so the hasValidHKPhoneNumber is expected to return true. What is the problem I am missing?

  • Default User Avatar

    The same is here on JS. No-one responded yet, really? 😵‍💫

  • Default User Avatar

    Yes, but you were not supposed to rely on luck, like you did. You're supposed to find a way to pass every time.

  • Custom User Avatar

    @Lightman47

    • Thanks Roman for such a nice feedback :relaxed:
    • Hope this humble kata help a little to sharpen your JS Skills, Hope you've enjoyed Sort Out the Men as Well :wink:
    • Wish you all the best On/Off CW .. Regards .. Zizou
  • Custom User Avatar

    Please, don't post your solutions in the kata discourse, even if they're marked as spoilers.

  • Custom User Avatar

    @Lightman47

    • Thanks bro for posting your Comment under the Right Lable, Spoiler, so not to reveal any pieces of informations about the Solution , Yep it's that simple :wink:

    • Hope you've done well in Expression Matter as Well :wink:

    • Wish you all the best Bro_ On/Off CW .. Regards .. Zizou

  • Custom User Avatar

    you could do this to see what the inputs are:

    console.log(`distanceToPump = ${distanceToPump}`);
    console.log(`mpg = ${mpg}`);
    console.log(`fuelLeft = ${fuelLeft}`);
    
  • Custom User Avatar

    @Lightman47 please don't post your solutions in Discourse (that's not what Discourse section is for in the first place), anyone that has completed the kata in any language can see it, so you'll be spoiling it for anyone that has solved it in another language and then want to try it in javascript.

  • Default User Avatar

    You can always find other solutions in solutions tab :P

  • Default User Avatar

    It's easier to use triple backtick for larger solutions. See this (section - Optional Section Formatting)

    Example:

    let x = 1;
    return x;
    
  • Custom User Avatar
  • Default User Avatar

    Use `code`: code or indent by 4 spaces:

    your code
    

    Second: What is your real question? You don't have to spoil code just to ask for formatting.