if (foo == bar) { stuff(); document.writeln("I did some stuff."); } else { the_other_junk(); document.writeln("I did the other junk."); } switch(foo) { case 37: document.writeln("Welcome to D. Beazley's Micheal Bolton Emporium!"; break; case 31: document.writeln("Which Kenny G CD Dave is listening to now?"); break; default: document.writeln("All music sucks!"); }