-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path18.number.html
More file actions
42 lines (39 loc) · 987 Bytes
/
18.number.html
File metadata and controls
42 lines (39 loc) · 987 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
<!DOCTYPE html>
<html>
<head>
<title>Js Numbers</title>
</head>
<body>
<p>
<span id="num1"></span>
</p>
<p>
The toString() method can output numbers as base 16 (hex), base 8 (octal), or base 2 (binary).
<br>
<span id="num2"></span>
</p>
<h2>Infinity</h2>
<p>
<span id="num3"></span>
</p>
<button onclick="stopWhenInfinity()">Stop when infinity</button>
<p id="num4"></p>
<p>
<h3>NaN</h3>
<span id="num5"></span><br>
<span id="num6"></span><br>
<span id="num7"></span><br>
<span id="num8"></span><br>
<span id="num9"></span><br>
</p>
<p>
<h3>Number Object</h3>
<span id="num10"></span><br>
<span>number 500 == object 500 is true. Because they are same value.</span><br>
<span id="num11"></span><br>
<span>number 500 === object 500 is false. Because they are same value but not same type.</span><br>
<span id="num12"></span><br>
</p>
<script type="text/javascript" src="js/18.number.js"></script>
</body>
</html>