A trim() method for the JavaScript String class
Just rediscovered that IE still doesn't include the trim() method on the String class. Here's a snippet of code, based on an answer on StackOverflow, to make sure there's a trim method available:
if (typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } }
On the positive side I also found out about the debugger included in IE 8. Just like Firebug, available via F12!