6 lines
191 B
TypeScript
6 lines
191 B
TypeScript
// 生成指定范围内的随机数
|
|
|
|
export const randomNum = (lowerValue: number, upperValue: number) => {
|
|
return Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue)
|
|
}
|