Is there any way to turn off all console.log statements in my JavaScript code, for testing purposes?
console.log
Just change the flag DEBUG to override the console.log function. This should do the trick.
DEBUG
var DEBUG = false; // ENABLE/DISABLE Console Logs if(!DEBUG){ console.log = function() {} }