what is the best method to check if statement being false or undefined but sometimes may not be true boolean
I am trying make this cleaner
var result = 'some time result is undefined'
if (result === false || 'undefined' && instantMessage === false || 'undefined'){
// do something
}
if (result !== undefined && result) {
//do something
}
I agree with above that question is not very clear. My snippet would work if you want something to be done only when it is 'true' boolean value