Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Which of the following is not considered as an error in JavaScript?

  2. A.

     Syntax error

    B.

     Missing of semicolons

    C.

     Division by zero

    D.

     All of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    Division by zero is not an error in JavaScript: it simply returns infinity or negative infinity. There is one exception, however: zero divided by zero does not have a welldefined value, and the result of this operation is the special not-a-number value, printed as NaN.


Be The First To Comment