Wtf Javascript type coercion

I recently came across the site wtfjs.com. It highlights some idiosyncrasies of the Javascript language. It’s worth a look, you’ll get a deeper understanding of the Javascript language. This entry submitted by @diogobaeder held my attention. The solution was not immediately obvious to me so I did some digging. Once I found the correct type coercion rules the result were logical. var foo = [0]; console.log(foo == foo); // true console....

2012-07-17 · 1 min · Wil Boayue