The usefulness of Console.log ()
It's mostly handy for your modal JavaScript, and you can see what you're outputting in the page.
His advantages compared to alert are:
He can see structured things, if it is alert, fade out an object is [Object Object], but the console can see the contents of the object.
Console does not interrupt the operation of your page, if you use alert to bounce out the content, then the page is dead, but the console output after your page can be normal operation.
The console is very informative and you can enter console in the console and you will see:
In addition, the use of alert debugging there is a big disadvantage or the pit dad, is debugging after forgetting to delete the alert () to remove or comment out the code to submit, the result is someone else visit this page inexplicable pop-up box ... This is a very bad habit, so when we do JavaScript debugging, try to use Console.log ().
The difference between the alert and Console.log () for JavaScript debugging