Chapter 9. Testing and Debugging

Having the ability to write sloppy code should never be a license to exercise that option. JavaScript, by its very design, is extremely flexible and forgiving to poor programming practices. Over the years, popular browsers have passively encouraged many bad behaviors by accepting invalid HTML and JavaScript syntax and making a best guess at inferring the programmer’s intention. In our opinion, the web would be a far better place if browsers simply aborted poor coding and forced developers to adopt better programming practices. But we live in this world, and we must tolerate the sloppy results of undisciplined developers and the forgiving infrastructure of the web. Before moving on to discussing testing and debugging ...

Get Modern Web Development with IBM® WebSphere®: Developing, Deploying, and Managing Mobile and Multi-Platform Apps 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.