Mega Code Archive

 
Categories / JavaScript DHTML / Language Basics
 

The else Block Responds to a false Value

<html> <head>   <title>The else Block Responds to a false Value</title> </head> <body>   <script type="text/javascript">   <!--     var purchaseAmount;     purchaseAmount = 101.00;         if(purchaseAmount > 500.00){       document.write("Thank you for your purchase!");     }else{       document.writeln("Thank you, but surely there is something ");     }   // -->   </script> </body> </html>