JavaScript prüfen, ob boolesche nicht definiert ist
if (typeof myFlag !== "undefined") {
// comes here whether myFlag is true or false but not defined
}
Scriper
if (typeof myFlag !== "undefined") {
// comes here whether myFlag is true or false but not defined
}