Posts

Showing posts with the label console.log

For web developers console.log() is Boring.

Image
  Everyone who is learning or knows JavaScript uses console.log() frequently. Basically the console.log method outputs a message to the web console. The message may be a single string (with optional substitution values), or it may be any one or more JavaScript objects . It seems like it is extremely handy method. Yes it is, but in case of debugging , NO its not. Why? The problem while debugging is after debugging we generally prefer to remove or comment all the console.log() if we found that there is no errors in the implementation of logic. Now if we found out that there are few new errors caught by team or self then we have to again write or uncomment the console.log(). Its tedious task and is Boring. So what is Solution? Solution is to use a seperate npm package to make our work more easy. We will use npm package named “debug” to make our task more systematic and will add some fun in debugging. Note that the version that i installed is : "debug": "