One gotcha I've noticed a lot is when people forget to check for Console object. Or they might do this (doesn't work):
if(!console)
instead of if(!window.console) or if( typeof console === 'undefined' )