Ad
  • Default User Avatar

    Actually, Chrome and Node.js use the same engine, but the versions may be different. And the rest is true.

  • Custom User Avatar

    in my envoriment (Chrome DevTools) when I run this code I see the right sequence

    Except CW and Chrome are different environments using different JavaScript engines. Without seeing your code it's impossible to tell what's the source of the issue, although most likely it's a bad comparator. In any case, not an issue.

  • Custom User Avatar

    the thing you don't know about the random tests for now is the inputs that are sent to your function. You get your result and the expected one in the assertion. "print the input to the console" (->console.log(yourType, opponentType, attack, defense)), right at the beginning of your function, so you'll see in the console (left panel) the inputs appearing just above the corresponding assertion message.

  • Custom User Avatar

    console.log("stuff in there")

  • Custom User Avatar

    print the input to the console to get a grasp about what's going on

  • Custom User Avatar

    @alex_prog

    • Thanks Alex for posting, Well, Since your code consist of two loops, if They're nested, then your Code performance will fail against the random ones Since they're testing large numbers

    somebody give me please little tip

    • Getting rid of Nested loops, excessive iterations, Recursive functions if found Will help, Optimize your code , also for more help , posting your code under Spolier Flag will make coders able to discover what's wrong :+1:
    • Tuned to hear your feedback, Hope you've Enjoyed Maximum Multiple, Sort out the Men Out of Boys :wink: .. Regards .. Zizou
  • Custom User Avatar

    it's best to mention the language you're using, but this is clearly about javascript, so here you go: the js spread syntax