Re:YouTube artificially slows down video load times when usi...
by ayhanfuat on Monday November 20, 2023 @07:59AM
(#38347339)
> In js I thought 1==true, and 1 is shorter than !0 ??
`1==true` but `1!==true` (`===` and `!==` check for type equality as well and while `!0` is a boolean, `1` is not.
Re:YouTube artificially slows down video load times when usi...
by the_gipsy on Monday November 20, 2023 @08:01AM
(#38347356)
Double-equals behaves differently than triple-equals. Minifiers probably can't swap them safely.
Re:YouTube artificially slows down video load times when usi...
by neuromanser on Monday November 20, 2023 @12:05PM
(#38350613)
!0 === true, but 1 !== true. I don't recall ever needing the strict comparison, but it seems to tickle the fancy of most js programmers.
Never seen the use of exponential notation for numbers in js though (not a surprise, I'm not really a programmer), it seems sensible to me from the point of shifting the domain from ms to seconds.