Changes

Jump to: navigation, search

JavaScript Flow Control and Looping

1 byte added, 19:17, 23 April 2007
The JavaScript ''if ... else'' Structure
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 Statements ===
The ''if'' statement above allows you to specify what should happen is a particular expression evaluates to ''true''. It does not, however, provide the option to specify something else that should happen in the event that the expression evaluates to be ''false''. This is where the ''if ... else'' construct comes into play.

Navigation menu