ICode9

精准搜索请尝试: 精确搜索
  • 求随机数2022-07-19 10:05:09

     PS:可以用parseInt() 替代下面代码的Math.floor()   /** * 生成 min - max 的随机数 * @param {*} min 小数 * @param {*} max 大数 * @returns 满足条件的任意数 */ function getRandom (min = 0,max = 10) { return Math.floor(Math.random() * (max - min + 1))

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有