July 1998
Intermediate to advanced
1456 pages
65h 5m
English
if/else — NN 2 IE J1 ECMA 1
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.
if (condition) {statement(s) if true} else {statement(s) if false}
var theMonth = myDateObj.getMonth()
if (theMonth == 1) {
monLength = calcLeapMonthLength()
} else {
monLength = calcMonthLength(theMonth)
}Read now
Unlock full access