js boolean true code example
Example 1: js is boolean
if (typeof variable === "boolean"){
// variable is a boolean
}
Example 2: true + true javascript
//booleans are converted to numbers before addition takes place
console.log(true + true); // 2