A

Admin • 828.03K Points
Coach

Q. What is the value of x?

Code:
let x = '5';
x = +x;
  • (A) '5'
  • (B) 5
  • (C) NaN
  • (D) undefined
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
Unary plus converts the string to a number.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.