Q. What is the output?
Code:
console.log('2' + 2 - 2);
β
Correct Answer: (B)
2
Explanation: '2' + 2 = '22'; '22' - 2 = 20.
console.log('2' + 2 - 2);
Explanation: '2' + 2 = '22'; '22' - 2 = 20.