CHAPTER 4

image

Debugging JavaScript Code

Sometimes it’s not the writing of code, but the management of it that gets to us, that drives us up a wall and back to our favorite video game. Why does it work on this machine, not that one? What do you mean, double-equals (==) is bad and triple-equals (===) is good? Why is running tests such a hassle? How should I package this code for distribution? We are plagued by questions, distracted by questions that do not directly bear on the code we are writing.

Of course, we should not ignore these issues. We want to write code of the highest quality, and when we fall short, we want access to easy-to-use debugging ...

Get Pro JavaScript Techniques, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.