Math 对象
Math.PI Math.max(); Math.min();
<script>
//Math对象
//1. Math.PI
console.log(Math.PI);
//2. Math.max
var max = Math.max(1, 2, 3);
console.log(max);
var min = Math.min(1, 2, 3);
console.log(min);
</script>
Math.abs(); 【绝对值 absolute】
//3. Math.abs()
var abs = Math.abs(-10);
console.log(abs);
Math.pow(x,y); 【x为底数,y为幂数】
//4. Math.pow(x,y)
var pow25 = Math.pow(2, 5);
console.log(pow25); //输出结果为32
Math.sqrt(); 开平方
//5. Math.sqrt();
var sqrt25 = Math.sqrt(25);
console.log(sqrt25);