Is there any way to turn off all console.log statements in my JavaScript code, for testing purposes?
console.log
If you use Grunt you can add a task in order to remove/comment the console.log statements. Therefore the console.log are no longer called.
https://www.npmjs.org/package/grunt-remove-logging-calls