You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/Types.html
+6-5
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,12 @@
13
13
</p><p>You should be able to try out most of the examples below by just copying them to the <ahref="http://www.getfirebug.com/" class="external text" title="http://www.getfirebug.com/">Firebug</a> console (note: Firebug requires <ahref="http://www.getfirefox.com" class="external text" title="http://www.getfirefox.com">Firefox</a>).
14
14
</p><p>Whenever an example mentions that a type defaults to a boolean value, the result is good to know when using that type in a boolean context:
15
15
</p>
16
-
<pre><codedata-lang="javascript">var x = ""
17
-
if ( x )
18
-
console.log( "x defaulted to true" )
19
-
else
20
-
console.log( "x defaulted to false" )
16
+
<pre><code>var x = "";
17
+
if ( x ) {
18
+
console.log( "x defaulted to true" );
19
+
} else {
20
+
console.log( "x defaulted to false" );
21
+
}
21
22
</code></pre>
22
23
<p>In this case, <code>"x defaulted to false"</code> is printed.
23
24
</p><p>To keep the examples short, the invert-operator is used to show a boolean context:
0 commit comments