JS Trap
JavaScript == vs ===: Why 0 == [] Is True but "0" == [] Is False
· JavaScript == vs === trap | 0 == [] true, toh "0" == [] bhi?
JavaScript loose equality (==) converts types before comparing: an empty array becomes an empty string, then 0. So 0 == "0" and 0 == [] are true, but "0" == [] is false. Strict equality (===) never converts types.
Daily TrapOne more trap, every dayA short JavaScript or Python output puzzle each day. Guess, see why, keep your streak.


![Animated sliding window over the array [2, 1, 5, 1, 3, 2]: a three-number window adds the new number and subtracts the old one, showing sums 8, 7, 9 and 6 and a maximum of 9.](https://i.ytimg.com/vi/NM5paB6_7wg/maxresdefault.jpg)