For me, one of the most important aspects of my career as a software developer is learning. I love to learn new stuff, and I don’t just mean play with shiny new technologies or gadgets; I mean improve my knowledge about the tools I need to use in my work. In fact, I like to learn something new every day!
So I thought I would start writing these quick snippets to record the new things I learn each day (assuming that I do in fact learn something new each day!).
Because not all browsers (ahem IE…) support console.log() when the debugger isn’t running, you may get a nullref exception!
It’s much better to use debugger; – so when you have the debugger open your code will automatically break at that point!