We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df4ea0b commit 89413dbCopy full SHA for 89413db
logic/logical-operators.js
@@ -13,3 +13,12 @@ console.log(10 < 4 || 7 < 2);
13
// && - return the first truthy value or the last one
14
15
let a;
16
+
17
+a = 10 && 20;
18
+a = 10 & 30 && 50;
19
20
+console.log(a);
21
22
+// real world application
23
24
+const posts = [""];
logic/truthy-falsy.js
@@ -74,3 +74,15 @@ if (Object.keys(users).length < 0) {
74
}
75
76
// since an empty object will return "true" we can use the javascript method to convert to array and then check the length
77
78
+// working with arrays
79
80
+const arr = [];
81
82
+if (arr) {
83
+ console.log(
84
+ "love is a higher revelation than all the wisdom and philosophy. "
85
+ );
86
+} else {
87
+ console.log("");
88
+}
0 commit comments