A

Admin • 833K Points
Coach

Q. What will be the value of x?

Code:
let x = '2' * '3';
  • (A) '6'
  • (B) 6
  • (C) NaN
  • (D) 23
  • Correct Answer - Option(B)
  • Views: 29
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

Multiplication forces numeric conversion, so '2' * '3' = 6.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.