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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -