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=rand(3,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("OUTCOME:"+ result);
  10. console.log(out);
Success #stdin #stdout 0.03s 16544KB
stdin
Standard input is empty
stdout
OUTCOME:1
pick:3 YOU LOSE!