javascript Operators if/else
@March 15, 2008, 1:22 a.m.
if/else | Firefox/Netscape/NN 2 IE 3 ECMA 1 |
|
|
This is a conditional statement that provides two execution paths depending on the result of the condition. You can nest another if or if/else statement inside either path of the if/else statement. |
|
Example | |
var theMonth = myDateObj.getMonth( ); if (theMonth == 1) { monLength = calcLeapMonthLength( ); } else { monLength = calcMonthLength(theMonth); } |
Permanent URL:
http://javascript.gakaa.com/operators-if-26-else.aspx
Powered by Linode.