A

Admin • 828.03K Points
Coach

Q. What is the output of this expression?

Code:
console.log('5' + 1);
  • (A) 6
  • (B) '51'
  • (C) undefined
  • (D) NaN
  • Correct Answer - Option(B)
  • Views: 11
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
String + number results in string concatenation in JavaScript.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.