Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Boolean Values

 

Boolean values accept only true and false values.. They express if a state of a variable is truthy or falsy. They are one of JS seven data types. They can be stored to variables exactly as numbers or strings. Comparison operators and logical operators (see later) return always boolean values as result to their expressions. 

Thus when comparing we can identify if the comparison is true or false and we can make decisions upon that.

Let's see how!