JS Booleans
Booleans represent yes-or-no states. Convert other values deliberately when you need a truth value.
Where to run this
This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.
A practical example
console.log(Boolean(""));
console.log(Boolean("ready"));
console.log(Boolean(0));
What happens
The results are false, true, and false.