- cross-posted to:
- programmer_humor
- cross-posted to:
- programmer_humor
Definitionally in IEEE floating point, NaN is not equal to anything, including itself. The only real abomination here is B:
> Math.min() Infinity > Math.max() -Infinity >
I mean, B does make some amount of sense, if you realize that it’s supposed to give you the maximum among the parameters (so you’d normally call it as
Math.max(5, 3) === 5
).Well, and you can call that with zero parameters, because you can spread an array into it, which might have zero length. And then given these conditions, and if you don’t want to throw an error, then
-Infinity
is kind of the least bad remaining option, as it’s likely to generally work with the rest of your logic.
Moot! Those ALL fail code review!
I’m guessing C
Just because it’s not a number, doesn’t mean it’s the same not number. But what if it is? 🙃
yup
@yogthos i afraid of (0 == ‘’) :blob_grinning_sweat:
A && B && C && D
It can’t be anything other than B, right?
it’s not B