Here's a typical example:
if(browser == "IE") { document.alert("You're using Explorer"); } else { document.alert("Nope, that's not Explorer"); }
You might want to test for more than one possible condition at the same time.
In that case you must nest your
if ...else statements:
if(today == "Monday") { its_monday(); } else { if(today == "Tuesday") { its_tuesday(); } else { another_day(); }