Skip to content

Commit b3efe2c

Browse files
committed
Add truthiness part.
1 parent 34c0fbe commit b3efe2c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</section>
5050
<section>
5151
<section data-markdown>
52-
# Types
52+
# Types &amp; Truthiness
5353
</section>
5454
<section data-markdown>
5555
## Objects
@@ -70,6 +70,21 @@
7070
[]
7171
function (x) { return x; }
7272
</section>
73+
<section data-markdown>
74+
## Comparisons and Truthiness
75+
76+
undefined == null // → true
77+
undefined === null // → false
78+
0 == false // → true
79+
1 == true // → true
80+
'0' == false // → true
81+
'1' == true // → true
82+
'' == false // → true
83+
'hello world' == false // → false
84+
'hello world' == true // → false
85+
86+
if conditions are like `!= false`
87+
</section>
7388
</section>
7489
<section>
7590
<section data-markdown>

0 commit comments

Comments
 (0)