2 ответов
+ 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