Question #25

Author: admin
tags: JavaScript  
let i = 0;

if (4 > 3 > 2) { i++; }
if (2 < 3 < 4) { i++; }
if (1 + 1 < 3 > 2) { i++; }

console.log(i); //  ??
What will the console output be?
0
1
2
3
6
Here the interpreter parses the expression from left to right.
The values true and false are converted to 1 and 0, respectively.
Example of parsing an expression by an interpreter:
1+1 < 3 > 2
2 < 3 > 2
true > 2
1 > 2
false
Rate the difficulty of the question:
easyhard