Following Example shows some simple expressions. For each line, it prints out a letter between a and d, followed by a colon and the result of the expressions (the
tag is there to create a line break and separate the output into four lines).
<script> document.write("a: " + (42 > 3) + "<br />") document.write("b: " + (91 < 4) + "<br />") document.write("c: " + (8 == 2) + "<br />") document.write("d: " + (4 < 17) + "<br />") </script>
if (1 == true) document.write('true') // True if (1 == TRUE) document.write('TRUE') // Will cause an error