- Add the following before any use of
Or (which is OK with JSHint’s
Or make a
logfunction that will not add a potentially useless object and that you will use instead of
(or just make sure you do not use
Something more detailed
console.log which I had forgotten from a debug session.
I deduced that, to save time, IE do not instantiate a console object unless the debug tool is up. That means if you need to log, you have either to make sure the object and function are present, either by creating it yourself or testing it every time.
Of course, the ideal solution would be not to use
console.log at all but we have to admit it is a nice shortcut when debugging.