87
rated 0 times
[
93]
[
6]
/ answers: 1 / hits: 38241
/ 11 Years ago, mon, september 16, 2013, 12:00:00
It seems to me that the code
console.log(1 / 0)
should return NaN
, but instead it returns Infinity
. However this code:
console.log(0 / 0)
does return NaN
. Can someone help me to understand the reasoning for this functionality? Not only does it seem to be inconsistent, it also seems to be wrong, in the case of x / 0
where x !== 0
More From » math