A

Admin • 833K Points
Coach

Q. What is the output?

Code:
console.log('2' + 2 - 2);
  • (A) 22
  • (B) 2
  • (C) NaN
  • (D) 0
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

'2' + 2 = '22'; '22' - 2 = 20.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.