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

Example 5.11:
The Logical Operators--Or


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



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