Hacker News new | ask | show | jobs
by dpwm 3033 days ago
You have to be mindful of the fact that IE8 was the first IE to have console.log[0] and that as a result it is possible that it wasn't used by the developers. It's also possible they always had the console open during development.

How did this ever manifest itself? The only thing that seems a plausible explanation is that the console injects the console object or the console.log function into the global JavaScript scope when it is opened and according to the behaviour described and either garbage collected or removed from scope when the console was closed. This seems like it could have only really been the intended behaviour.

[0] https://developer.mozilla.org/en-US/docs/Web/API/Console/log...