Will use of the debugging feature console.log reduce JavaScript execution performance? Will it affect the speed of script execution in production environments?
console.log
I do it this way to maintain original signature of console methods. In a common location, loaded before any other JS:
var DEBUG = false; // or true
Then throughout code
if (DEBUG) console.log("message", obj, "etc"); if (DEBUG) console.warn("something is not right", obj, "etc");