Is there any way to turn off all console.log statements in my JavaScript code, for testing purposes?
You can use logeek, It allows you to control your log messages visibility. Here is how you do that:
logeek.show('security');
logeek('some message').at('copy'); //this won't be logged
logeek('other message').at('secturity'); //this would be logged
You can also logeek.show('nothing') to totally disable every log message.