-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest6.html
More file actions
43 lines (43 loc) · 978 Bytes
/
test6.html
File metadata and controls
43 lines (43 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
//0b代表2进制,0o代表八进制
var Rex = /\d{2}/g;
var a = 0b011;
var b = 0o16;
console.log(b);
Number(a);//将其他进制转化为10进制
// alert(a);
console.log(isNaN(NaN));
console.log(isFinite(Infinity));
console.log(Number.isInteger(2.000));
console.log(Number.EPSILON);
// alert(Rex.flags)
// 安全整数
var x = Math.pow(2, 53);
console.log(x);
console.log(x+1000);
// if (x == x+1){
// alert(1)
// }
// 安全数的最大值
var y = Number.MAX_SAFE_INTEGER;
// 安全数额最小值
var z = Number.MIN_SAFE_INTEGER;
console.log(y);
console.log(z);
// Math方法的扩展
var x1 = Math.trunc(112121.212121);
console.log(x1);
var x2 = Math.sinh(90);
console.log(x2);
var x3 = 2**5;
console.log(x3);
</script>
</body>
</html>