-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path04-built-in.html
More file actions
45 lines (33 loc) · 1.13 KB
/
04-built-in.html
File metadata and controls
45 lines (33 loc) · 1.13 KB
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
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Built In Functions</title>
<script>
// alert("Please fill all fields of the form.");
console.log(typeof("12345")); // String
console.log(typeof(12345)); // Number
console.log(typeof(parseInt("1234.1212")));
console.log(parseInt("1234.1212 ABC"));
console.log(typeof(parseFloat("1234.11342")));
document.write(eval("2 + 2"));
console.log(isNaN("ABC"));
prompt("Enter Name", "John Doe");
// 123 is Not a Number -> false
// ABC is Not a Number -> true
// var surity = confirm("Are you sure you want to delete zainab from this world?");
// if (surity == true) {
// document.write("You click on OK means value is true.");
// }
// else {
// document.write("You click on Cancel means value is false.");
// }
// function message() {
// }
</script>
</head>
<body>
<!-- ... empty ... -->
</body>
</html>