Despite being a little bit non-intuitive... I think one problem is trying to interprete this function as something like Number.MAX_VALUE In order to compare with something to find the max value, you will always have one number to start on, and to make it to be the max or the lowest always, makes total sense to have the "current" max or min value being -Infinity and Infinity respectively.
Despite being a little bit non-intuitive... I think one problem is trying to interprete this function as something like
Number.MAX_VALUEIn order to compare with something to find the max value, you will always have one number to start on, and to make it to be themaxor thelowestalways, makes total sense to have the "current" max or min value being-InfinityandInfinityrespectively.You are spot on with my misthinking that
Math.max() === Number.MAX_VALUE😂