Multiple choice technology web technology

What is the output for the below lines of code? x = 0/0; alert(x);

  1. undefined

  2. infinity

  3. NaN

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JavaScript, 0/0 results in NaN (Not a Number), which is a special numeric value representing an undefined or unrepresentable mathematical result. NaN is a number type in JavaScript, but it indicates an invalid mathematical operation.