true false in js code example
Example 1: true + true javascript
//booleans are converted to numbers before addition takes place
console.log(true + true); // 2
Example 2: javascript function return boolean
function func(){
return true;
}
isBool = func();
console.log(typeof (isBool)); // output - string
let isBool = func();
console.log(typeof (isBool)); // output - boolean