javascript 生成随机数

  1. Math.floor(Math.random()*2)
  2. Math.floor(Math.random()*5)
  3. Math.floor(Math.random() * (max - min + 1)) + min
  4. Math.random().toFixed(13).slice(2)