Will console.log reduce JavaScript execution performance?

前端 未结 9 1264
半阙折子戏
半阙折子戏 2020-12-24 00:03

Will use of the debugging feature console.log reduce JavaScript execution performance? Will it affect the speed of script execution in production environments?

9条回答
  •  太阳男子
    2020-12-24 00:45

    Any function call will slightly reduce performance. But a few console.log's should not have any noticeable effect.

    However it will throw undefined errors in older browsers that don't support console

提交回复
热议问题