3 ms·
So both works out to something that looks like an exponent value, and then the non-strct comparison evaluates them both as 0. The simple solution is ===. A lo
by LarryMade2 12y ago
So both works out to something that looks like an exponent value, and then the non-strct comparison evaluates them both as 0. The simple solution is ===.
A lot of luck having a hash with an 0e############ result.
- sarciszewski 12y agohttps://twitter.com/voodooKobra/status/534724855103774721 https://twitter.com/voodooKobra/status/534724855103774721 Comparing /^0e[0-9]{30}$/ with /^[0-9a-f]$/ gives you a chance of about 2.939 x 10^-9 in 1 (or about 0.0000002939%) of occurring. This is a naive probability estimate. Compared to a birthday collision, we can expect 6.28 * 10^28 0e############################## cases to occur for every hash collision. Of course, there's also the possibility that 1e would act the same way, which effectively doubles the odds.