34,333
edits
Changes
→The JavaScript ''if'' Structure
<pre>
if (i < 2)
</pre>
Whilst this is perfectly valid JavaScript it is recommended, for the purposes of consistent scripting style, that the braces be used even for a single line of script after the 'if' statement.
=== The JavaScript ''if ... else'' Structure ===