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.