Previous Example-|-Next Example-|-Return to Chapter Listing

Example 5.9:
Logical Operators--Not


Click this button to see the value in the bCheck variable, the result of using the Not operator on the bFirstValue variable:


This is the script we used. First we placed this in the HEAD: <SCRIPT LANGUAGE="JAVASCRIPT"> <!-- var bFirstValue = false var bCheck = !bFirstValue //--> </SCRIPT> Then we created this button: <form> <input type="button" name="VariableButton" value="The result of the calculation" onclick="alert(bCheck)"> </form>
Previous Example-|-Next Example-|-Return to Chapter Listing