+ 1
Why in javascript, divide by zero = infinity????
https://code.sololearn.com/w9iXeLS2zM74/?ref=app https://m.youtube.com/watch?v=BRRolKTlF6Q
3 Réponses
+ 6
Just think about it
Let's say you have a number 10
10 % 5 = 2
10 % 2 = 5
10 % 1 = 10
10 % 0.5 = 20
10 % 0.1 = 100
10 % 0.00...001 = 10^n times 0
I hope you understand.
+ 4
Because the designers decided not to throw an exception in this case.
0
Ok... but it's a bit "illegal"...