Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I like IE\'s persnicketiness (the debugging tools that take you right to your co

ID: 651605 • Letter: I

Question

I like IE's persnicketiness (the debugging tools that take you right to your code is even more user-friendly than what I've found in F12 Chrome Dev Tools), but why does it say, "'console' is undefined" re: this line of jQjuery:

console.log("entered submit button click");
How could console be undefined? Neither Chrome nor Firefox complain about it...

And ironically, IE shows me this error message where? In the "Console" tab! Shirley it couldn't be case-sensitive, and it expects "Console.log"?

BTW and anyway, I'm impressed with IE's F12 tools; I wonder if it's "The Avis Effect" at work - they were #5 (among Browsers) and have thus begun fighting like a rabid wolverine to claw and scratch their way upwards?

Explanation / Answer

As mentioned the console object is not guaranteed to exist in IE. It only gets "created" when the debug tools are opened.

I wrote a small lib that handles this and other cross browser console issues such as console.time support in IE and console.profile inconsistencies.

For example counsell.time will never throw an error in IE, with or without the debug tools open.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote