var rnd =(a, b)=> Math.floor(('0.'+ (new Date().getMilliseconds()+''.slice(1)) ) * (b - a)) + a; console.log(rnd(0,100));