-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrow.html
More file actions
92 lines (62 loc) · 2.21 KB
/
Copy patharrow.html
File metadata and controls
92 lines (62 loc) · 2.21 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css">
<link rel="shortcut icon" href="favicon.png" type="image/png">
<title>Arrow</title>
</head>
<body>
<script>
const fun = () => {
name: "Kapil";
age: "18";
}
console.log(fun);
const square = (num) => {
return num * num;
}
console.log(square(5));
const arrayy = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const even = (arr) => {
const result = arr.filter((num) => num % 2 == 0)
return result;
}
console.log(even(arrayy));
let x = 10; // Reassign allowed but, no redeclaration; LIFO Structure
{
let x = 20;
x = 60;
console.log(x); // First
if (x != 0) {
x += 200
console.log(x); // Second
}
}
console.log(x); // Third
// var, let can't be accessed outside function
function jesse() {
var num = "string"
if (true) {
num = "string2"
console.log("new text");
}
return num;
}
console.log(jesse());
// console.log(num);
let num1 = 90;
let num2 = "10";
console.log(num1 + num2);
console.log(num1 - num2);
console.log(num1 === num2); //checks type and value
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
crossorigin="anonymous"></script>
<script src="script.js"></script>
</body>
</html>