Skip to content

Commit aaeb98f

Browse files
committed
Practiced Js if-else
1 parent f8e922a commit aaeb98f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Day-38/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Js Conditionals</title>
7+
</head>
8+
<body>
9+
<script src="script.js"></script>
10+
</body>
11+
</html>

Day-38/script.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if (2 < 3) {
2+
alert(2<3); // true
3+
}
4+
5+
let first_name = "Harsh";
6+
if (first_name === "Harsh") {
7+
alert(`Yep, your name is ${first_name}.`); // Yep, your name is Harsh.
8+
} else {
9+
alert("Nah, you're not Harsh.");
10+
}

0 commit comments

Comments
 (0)