inside conditional statement any logical operation will evaluate to a boolean value which determines whether or not the conditional block will be executed or not. Like the following statement will determine the IF statement will execute or not
if(null || 1){} // evaluates to boolean value
but the same conditional statement will evaluates to Number value when assigned to a variable.Consider this:
var x = null || 1 // x will become 1
my another question is does the order of null and 1 matters here?
what determines when a conditional operation will become Boolean or Number ?