console.info(_.random(0, 5));
// => an integer between 0 and 5
console.info(_.random(5));
// => also an integer between 0 and 5
console.info(_.random(5, true));
// => a floating-point number between 0 and 5
console.info(_.random(1.2, 5.2));// 设置 true false都会是浮点数;
// => a floating-point number between 1.2 and 5.2
标签:info,5.2,console,产生,random,_.,随机数,between
From: https://www.cnblogs.com/pansidong/p/16996392.html