Cross-browser JavaScript Debugging

Using alert() is annoying!

console.log() rocks!

var thing = 0;
   …complicated JavaScript happens here…
console.log(thing);

...unless you need to debug in IE which doesn't understand console.log()

Use document.title instead! (especially when debugging events)

var thing = 0;
   …complicated JavaScript happens here…
document.title = thing;

Move your mouse around and look at the top of your browser.