Javascript best practice: handling Firebug-specific code
问题 Firebug is certainly a wonderful tool for javascript debugging; I use console.log() extensively. I wanted to know if I can leave the Firebug-specific code in production. What's the best practice? Commenting the debug code? 回答1: If you leave console.log() calls in your production code, then people visiting the site using Internet Explorer will have JavaScript errors. If those people have extra debugging tools configured, then they will see nasty dialog boxes or popups. A quick search revealed