Consider a variable master
which can be true
or false
, never anything else.
Consider another variable override
which can be undefined
, true
or false
.
So how to determine which variable to use, if override
is not undefined
then use that otherwise use master
.
Maybe we could do:
if ((master !== undefined && master) || override) then
...
But is this correct and also is there a better way?