I was using console.log() in some JavaScript I wrote and an error of: console is not defined was thrown in Internet Explorer (worked fine in other
Some browsers do not have console enabled when the dev-tools is closed. Also, one would encounter this issue with WebViews or iFrames where console is disabled.
The error in these cases is - Uncaught ReferenceError: console is not defined
Inspired by many answers on here, I developed a library for this usecase: https://github.com/sunnykgupta/jsLogger
Features:
log, warn, error, info.