Information entered into a form may need different validation depending on where your visitor lives or whether they are male or female. An object being moved around the page needs to change direction when it reaches the edge of the browser window. The background displayed behind part of our page may be different depending on when the page is displayed.
Most of the variables that we work with are not Boolean. We convert other variable types into Boolean values by performing comparisons. We can compare two values to test if they are equal. When they are equal then the comparison returns true and when they are not equal then the comparison returns false. If we compare two numbers to see if one is greater than the other then if it is greater then the comparison returns true and if it not greater then the comparison returns false.
This article written by Stephen Chapman, Felgall Pty Ltd.