This content originally appeared on DEV Community and was authored by Randy Rivera
Understanding Boolean Values
Another data type is the Boolean. Booleans may only be one of two values: true or false.
Note: Boolean values are never written with quotes. The strings "true" and "false" are not Boolean and have no special meaning in JavaScript.
- Example:
function welcomeToBooleans() {
return true;
}
welcomeToBooleans(); // will display true
function welcomeToBooleans() {
return false;
}
welcomeToBooleans(); // will display false
This content originally appeared on DEV Community and was authored by Randy Rivera
Randy Rivera | Sciencx (2021-04-18T16:11:21+00:00) Boolean Values. Retrieved from https://www.scien.cx/2021/04/18/boolean-values/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.