问:JavaScript如何获取两个整数之间的随机整数
七娃博客
74人阅读
JavaScript如何获取两个整数之间的随机整数?
const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min); console.log( random(1, 50) );
主题开源不易,支持一下作者吧!
使用支付宝打赏
使用微信打赏
评论 | 0 条评论
登录之后才可留言,前往登录