Skip to content

Commit dd963fa

Browse files
authored
Create Logical-Operators.js
1 parent ea67177 commit dd963fa

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Logical-Operators.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
// Logical Operators
3+
4+
5+
const hasDriverLicense =true;
6+
const hasGoodVision = true;
7+
8+
console.log(hasDriverLicense && hasGoodVision);
9+
console.log(hasDriverLicense || hasGoodVision);
10+
console.log(!hasDriverLicense);
11+
12+
const isTired = true;
13+
14+
console.log(hasDriverLicense && hasGoodVision || isTired);
15+
16+
if(hasDriverLicense && hasGoodVision && isTired)
17+
{
18+
console.log(`Sarah has able to drive`);
19+
}
20+
else {
21+
console.log(`someone else should drive `);
22+
}

0 commit comments

Comments
 (0)