📜  方格随机数 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:37.028000             🧑  作者: Mango

代码示例1
1. 
const createSquares = (numberOfSquares) => {
    for (let i = 0; i < 12; i++){
        const square = $('box')
        $('.squares').append(square)
    }
  }
$('.startgame').on('click',() => {
    createSquares();
})




let randObj = {

};
for(let i = 0; i < 12; i++){
    randObj[i] = randomNumber(0, 11)
    
}


function randomNumber(min, max) { 
    return Math.floor(Math.random() * (max - min) * 1);
}