When to use console.clear?

Asked

Viewed 180 times

5

I was going through my website and installed a plugin, unfortunately it did not load according to the page, giving several warnings on the console, for each product a warning, that is, more than 100 warnings ( warnings, not errors ), I used the console.clear to eliminate these warnings.

You got a problem doing that?
When should I use console.clear?

1 answer

6


The console.clear is used to clear console messages, which are usually written with console.log.

It aims to make it easier to read the LOG information in development/test environment, in code debugging, when there is too much unnecessary, we clean up and then write the new information.

There is no problem in cleaning.

Just be careful that the console.clear don’t mess up when you want to debug something. That is, don’t clean messages you want to see.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.