When to Use JavaScript

One of the most important things to know about JavaScript is when to use it. Even though it provides much needed functionality in many scenarios, there are often times it is simply not needed. One reason is the fact that JavaScript is not always interpreted the same or correctly—an important point to remember.

As a programmer, you should be able to write code, no matter how simple or complex, that will be executed correctly. However, there are browsers that have bugs that prevent JavaScript from working the way it was programmed. Before programming in JavaScript, you should first try to understand any documented bugs that exist. Doing so can save you hours of debugging in the long run.

Try to determine if you really need ...

Get Pure JavaScript 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.