<html>
<SCRIPT LANGUAGE="JavaScript">
<!--
mailFlag = "YES"
var message1;
var message2;
if (mailFlag == "YES"){
message1 = "A";
}else{
message1 = "B";
}
//Same statement using conditional operator
message2 = (mailFlag == "YES") ? "A" : "B";
document.write("The if statement returns: ",message1,"<BR>");
document.write("The conditional operator returns: ",message2);
-->
</SCRIPT>
</html>
|