Hacker Newsnew | past | comments | ask | show | jobs | submit | maxanger's commentslogin

if (window.console) console.log(...);


That really should be built in to console.log.


I may not be entirely sober yet but I believe the problem at hand is what happens when window.console isn't defined at all.


It can be, but only if console.log is defined in your source code. It isn't when you use Firebug, so it won't be when you're not using Firebug.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: