Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Web technologies Questions | JavaScript Course Quiz 2 | Question 5

  • Last Updated : 10 May, 2019

What will be the output of the following code?




<script>
 let ans = 0 / 0;
 document.write(ans);
</script>

(A) 0
(B) infinity
(C) NaN
(D) None of the above


Answer: (C)

Explanation: 0/0 is undefined for the real number and is therefore represented by NaN (Not a Number) in Javascript.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!