Friday, May 3, 2019

console.log and more

So in Javascript programming the first crude debug tool was the alert... like alert("Hello"). that give you an (annoying) little message box. Well it is a bit distracting so later on there was the console.log(). Great now the messages show in the Developer console, like printf in the C world and System.out.println in the Java world.

But wait, there's more. There is also console.group and conole.groupEnd where you can indent your stuff. and have warning etc, Neato isn't it?

https://developer.mozilla.org/en-US/docs/Web/API/Console/group