-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif statement.js
More file actions
36 lines (32 loc) · 778 Bytes
/
if statement.js
File metadata and controls
36 lines (32 loc) · 778 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
// Conditional statements
// console.log("before the if statement");
// let age=23;
// if (age >=18) {
// console.log("you can vote");
// console.log("you can drive");
// let a=5;
// console.log(5*a);
// }
// console.log("after the if statement");
// console.log("before the if statement");
// let age=23;
// if (age >=18) {
// console.log("you can vote");
// }
// if (age >20) {
// console.log("you cannot vote");
// }
// console.log("after the if statement");
console.log("before the if statement");
let age=23;
if (age >=18) {
console.log("you can vote");
}
console.log("after the if statement");
if (age >20) {
console.log("you cannot vote");
}
let Firstname = "Aman";
if (Firstname == "Aman") {
console.log(`welcome ${Firstname}`);
}