Why you my code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
2 Answers
+ 14
var min=prompt("min number"); var max=prompt("max number"); // code begins var ran=Math.floor(Math.random()*max); if(ran>=min && ran<=max){ alert (ran); } else if(!ran){ alert (Math.random ()); } else{ alert ("min>max!") } // Return is only used with functions
27th Jun 2017, 7:45 AM
Dev
Dev - avatar
+ 4
thanks;)
27th Jun 2017, 9:21 AM
iQuzy
iQuzy - avatar