Boolean() js code example
Example 1: js is boolean
if (typeof variable === "boolean"){
// variable is a boolean
}
Example 2: javascript true string to boolean
var isHidden='true';
var isHiddenBool = (isHidden == 'true');
if (typeof variable === "boolean"){
// variable is a boolean
}
var isHidden='true';
var isHiddenBool = (isHidden == 'true');