-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcondition.js
More file actions
56 lines (39 loc) · 951 Bytes
/
Copy pathcondition.js
File metadata and controls
56 lines (39 loc) · 951 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
//if statements
const youLikeMeat = true;
if (youLikeMeat) {
console.log("bring me the meaty menu...!");
}
else {
console.log("Get me the vegetarian menu asap!");
}
//if, else if statement
var myAge = 9;
if (myAge > 19) {
console.log("Oga na 19years you be")
}
else if (myAge == 19) {
console.log("Yeah 19 is your correct age")
}
else if (myAge >= 10) {
console.log("omo guy u don dey above age 10 since na")
}
else {
console.log(" no... you re 19 years")
}
//logical operators(if else statement)[AND]
const myAge = 25;
if (myAge >= 17 && myAge <= 30) {
console.log("you can come, you cool dude");
}
else {
console.log("Nah dude, you ain't coming!");
}*/
//[OR]
const myAge = 18;
if (myAge < 1 || myAge >= 18) {
console.log("You are ready to own both a car and a house");
}
else {
console.log("Oh sorry, You ain't ready to own any!");
}