What is the output of `’5′ – 3` in JavaScript?

JavaScript Professional Easy

JavaScript Professional — Easy

What is the output of `’5′ – 3` in JavaScript?

Key points

  • JavaScript automatically converts strings to numbers when used in arithmetic operations.
  • The subtraction operator (-) performs mathematical subtraction.
  • The correct answer is a numerical value, not a string or NaN.

Ready to go further?

Related questions