December 2013
Intermediate to advanced
384 pages
9h 54m
English
if (age >= 100){ document.write("Wow you are a centurian!"); } else if (age >= 18) { document.write("You are an adult."); } else { document.write("You are a child."); }
If blocks are created using the basic if (comparison) {IF_BLOCK}. The if block can be followed up by an additional else block using else{ELSE_BLOCK}. In addition, you can add a condition to the else block using else(condition){ELSE_BLOCK}.
Read now
Unlock full access