What is the Infinity property used for in Javascript? -


why infinity property used command (rather result)

for example, code below works, result isn't expected.

 alert(isodd(infinity));  function isodd(num) { return num%2==1; }  

infinity property of global object holds numeric value representing mathematical concept of infinity. don't know normal definition called "command."

with regard edit, should return false (i ran confirm suspicion, , did on browser). correct, infinity not considered odd number.


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -