What is the output of the arithmetic expression 7 / 0 in JavaScript?

  • 0
  • Infinity
  • NaN (Not-a-Number)
  • Error
The output of the arithmetic expression 7 / 0 in JavaScript is Infinity. In JavaScript, dividing a number by 0 results in positive or negative infinity depending on the sign of the numerator. Attempting to divide by 0 does not throw an error, but it produces infinity.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *