
What is the result of Math.max() is greater than Math.min() - nlolks
Can someone please explain? I learn something new about JS everyday !
if (Math.min() &lt; Math.max())
    console.log(&quot;if block?&quot;)
else 
    console.log(&quot;or else block?&quot;)
======
detaro
Why don't you just try what their results are and compare them, then it should
be obvious why this is true.

~~~
gus_massa
I think that the implicit question is: Why someone choose this behavior?

[spoiler alert] The idea is that if

    
    
      A={a1, a2, ...}
      B={b1, b2, ...}
    

are sets, then

    
    
      min(union(A, B)) = min(min(A), min(B))
    

I don't expect this code will not compile as is in any language, but I hope
it's understandable enough.

The what happens if A is the empty set? if we define

    
    
      x = min(empty)
    

then

    
    
      min(union(empty, B)) = min(B) 
      min(min(empty), min(B)) = min(x, min(B)
    

so

    
    
      min(B) = min(x, min(B))
    

Then x must be a number big enough to be bigger than min(B) for any set B. But
min(B) can be very big if B has only big numbers, so the only possibility is
that x = +infinity.

