A

Admin • 833K Points
Coach

Q. How to convert a string to an integer in JavaScript?

  • (A) parseInt(str)
  • (B) Number(str)
  • (C) +str
  • (D) All of the above
  • Correct Answer - Option(D)
  • Views: 21
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

All mentioned methods can convert string to number.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.