JavaScript equality comparison is a crazy thing, sometimes. When in doubt, use three equals signs.
You can view the demo here.
You can also check out a new, unified version of the equality table.