JavaScript vérifie si booléen n'est pas défini
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
}