function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; }
function getRandomIntInclusive(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
這兩個函數的區別是啥?
收起
因为random函数是不能得到零这个数的
报告相同问题?