Range check
Ensure that values don't exceed a specific range. For example, when you want to check that the temperature is between 97.8°F to 99.1°F.
Example 3-4 Temperature range check
In this example, we are looking for temperatures outside of a certain range.
//validate if a given a temperature (temp_f) is outside of a specified range
var upper = 99.1;
var lower = 97.8;
if (temp_f > lower && temp_f < upper){
return false;
}
Parent topic: General expressions