JavaScript 从两个整数中确定随机整数
const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
let result = random(1, 50);
console.log(result);
本文来自博客园,作者:重庆熊猫,转载请注明原文链接:https://www.cnblogs.com/cqpanda/p/16813813.html
const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
let result = random(1, 50);
console.log(result);
本文来自博客园,作者:重庆熊猫,转载请注明原文链接:https://www.cnblogs.com/cqpanda/p/16813813.html