Answers for "how to detect the type of boolean javascript"

0

js how to check typeof boolean

if (typeof variable == "boolean") {
    // variable is a boolean
}
Posted by: Guest on August-21-2021
0

javascript check if true force to be boolean

var obj = {a: 1}
var to_bool_way1 = Boolean(obj) // true
var to_bool_way2 = !!obj // true
Posted by: Guest on May-04-2021

Code answers related to "how to detect the type of boolean javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language