Stop using simple console.log in JavaScript
<p>Debugging. Something that programmers try hard to avoid, only to make more bugs in code.</p>
<p>Coding without bugs is something even the best programmers would find hard. Which is why, you should always debug code.</p>
<p>And one of the best ways to debug JavaScript code is the amazing <code>console.log()</code>. Except, there are better ways.</p>
<p>And that is the point of this article. To tell about better ways to interact with the console.</p>
<p>Typing console in a sophisticated IDE gives a variety of auto completions.</p>
<p>Instead of using the normal <code>console.log()</code>, here are some better options.</p>
<p>Using these makes the process of debugging a lot easier and faster.</p>
<h2><code>console.warn() </code>and console.error()</h2>
<p>When there is a bug that can stop the working of your application, using another console.log to debug it wouldn’t work.</p>
<p>Your console messages would get mixed up. You can’t find the message that your looking for.</p>
<p>But, using console.warn() and console.error() are good ways to overcome this.</p>
<p><a href="https://medium.com/@anirudh.munipalli/stop-using-console-log-in-javascript-try-these-instead-72490d895a24">Click Here :-</a></p>