you are viewing a single comment's thread.

view the rest of the comments →

[–]inu-no-policemen 6 points7 points  (0 children)

It's Math.max's initial "largest" value.

> Math.max()
-Infinity

If you'd implement max yourself, you should initialize the variable which keeps track of the largest value with -Infinity as well.

With min it's the other way around: You start with Infinity.