Can someone explain what will be the order of execution of following JavaScript Code:
(true + false) > 2 + true
I understand using + operator over two Boolean values returns the result as 0,1 or 2 depending upon the values being provided.
I interpreted output of above code as 1 by breaking the execution in following order:
1) (true + false) // Outputs : 1
2) 1 > 2 // Outputs : false
3) false + true //Outputs : 1
But the actual result is:
false
Can anyone correct my understanding if am interpreting the code in wrong way.