| 123456789101112131415161718192021222324252627 | 
							- <!DOCTYPE html>
 
- <html lang="en">
 
- <head>
 
-     <meta charset="UTF-8">
 
-     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-     <title>Document</title>
 
- </head>
 
- <body>
 
-     <script>
 
-         // 变量
 
-         var a = '1';
 
-         // 字面量 1 2 3 4 true '哈哈'
 
-         console.log(Math.PI);//π
 
-         console.log(Math.E);//常量
 
-         console.log(Math.pow(2,6));//x的y次幂
 
-         console.log(Math.ceil(12.3));//向上取整
 
-         console.log(Math.floor(12.4));//向下取整
 
-         console.log(Math.abs(-2));//绝对值
 
-         console.log(Math.sqrt(81));//算术平方根
 
-         console.log(Math.round(2.7));//四舍五入
 
-         console.log(Math.random()*10);//随机数
 
-         // 随机数x-y取整
 
-         // Math.round(Math.random() * (y-x) + x)
 
-         console.log(Math.round(Math.random() * (10-1) + 1));
 
-     </script>
 
- </body>
 
- </html>
 
 
  |