fork(1) download
  1. // your code goes here
  2. function rand(max,min)
  3. {return Math.floor(Math.random()*(max-min)+min)};
  4. let result="OUTCOME:"+ rand(5,1);
  5. let x=3;
  6. let out="";
  7. if(x==result){out="pick:"+x+" YOU WON!"}
  8. else{out="pick:"+x+" YOU LOSE!"}
  9. console.log(result);
  10. console.log(out);
Success #stdin #stdout 0.04s 16672KB
stdin
Standard input is empty
stdout
OUTCOME:2
pick:3 YOU LOSE!