markupboy

Truth, Equality and JavaScript

Penned on .

New post on Angus Croll's JavaScript, JavaScript blog on the crazy intricacies of how JavaScript handles equality and truth with examples like:

if([0]) {
  console.log([0] == true); //false
  console.log(!![0]); //true
}