Answer the question
In order to leave comments, you need to log in
At the time of development, I have outputs to the console in JS. Is it necessary to remove them in the production version of the project? What's wrong with not removing it?
Why is it bad if I don’t remove something (I forget, I don’t notice, I just don’t remove it). The user will still not get into the developer mode. After all, these conclusions do not affect the operation and appearance of the site.
Answer the question
In order to leave comments, you need to log in
As for the fact that the user will not get into the console, you are wrong, I often get along. Well, they forgot and forgot, I hope there is nothing important. But it's better not to forget. And if the withdrawal goes constantly and a lot, it gives an additional load.
depends on how often he works for you, if several times it's not scary
For such things, a project build and tools like www.jslint.com were invented . The output to the console on the prod is not about "scary" it's about the attitude of the developer to his work.
To do this, the builders have an option to remove output to the console from the code when building production builds.
Redefine the console.log function, depending on the flag, there will be either output or inactivity.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question