I’ve always been told that when debugging an application, JavaScript’s console.log() method is preferred over simply using an alert() method. Why is this? Is there a good example someone can point me to where console.log() is obviously the better choice?
I’ve always been told that when debugging an application, JavaScript’s console.log() method is preferred
Share
alert()is blockingalert()cannot be easily suppressed in non-debug environmentconsoletypically formats your objects nicely and allows to traverse themalert()message at a timeconsoles can have different logging levels with intuitive formatting