export const randomNum = (min, max) => Math.floor(Math.random(
export const randomNum = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;

js生成指定范围随机数 JavaScript 实用工具

复制上面命令,调用 randomNum(A,B) 即可

本文由青舟模板网发布,如若转载,请注明出处:http://qingzo.com/jishu/20220410105306.html