1. Math.radom()生成 [0,1) 的随机数 ```javascript let num = Math.random()

    //返回[0,9)的随机数 let num = parseInt(Math.random() * 9)

    //返回[1,10]的随机数 let num = parseInt(Math.random() * 10) + 1

    1. 2. 舍入
    2. 1. 向上取整
    3. ```javascript
    4. let num = Math.ceil(1.4);
    5. console.log(num);
    6. //2
    1. 向下取整

      1. let num = Math.floor(1.4);
      2. console.log(num);
      3. //1
    2. 标准四舍五入

      1. let num = Math.round(1.4)
      2. console.log(num);
      3. //1
      4. let num = Math.round(1.5)
      5. console.log(num);
      6. //2
    1. 次方

      1. let num = Math.pow(2, 2)
      2. console.log(num);
      3. //4
    2. 绝对值

      1. let num = Math.abs(-2)
      2. console.log(num);
      3. //2
    3. 平方根

      1. let num = Math.sqrt(4)
      2. console.log(num);
      3. //2
    4. 最大值

      1. let num = Math.max(1, 2, 3, 10, 100, 300)
      2. console.log(num);
      3. //300
    5. 最小值

      1. let num = Math.min(1, 2, 3, 10, 100, 300)
      2. console.log(num);
      3. //1