function rndnum(from,to){
return ~~((to-from)*Math.random()+from);
}
for (var i=0;i<5;i++) console.log(rndnum(20,30));Ответ:
20
23
24
24
22
JavaScript test | #JavaScript
JA JavaScript test @js_test · 9.67K subscribers function rndnum(from,to){
return ~~((to-from)*Math.random()+from);
}
for (var i=0;i<5;i++) console.log(rndnum(20,30));