WishMeLz

生活其实很有趣

随机数

function getRandom(start, end, fixed = 0) {
        let differ = end - start
        let random = Math.random()
        return (start + differ * random).toFixed(fixed)
    }

getRandom(1,5)   1<= num >=5