How to quickly and conveniently disable all console.log statements in my code?

I have the solution with the help of this code you are able to disable all console.log statements in your code.

Redefine the console.log function in your script.

console.log = function() {}