Chapter 1
JavaScript Gotchas

JavaScript is full of surprises, not all of which are pleasant. When our understanding of the semantics differs from the language’s intentions, we lose. In this chapter you’ll learn about some of the most fundamental unpleasant semantical idiosyncrasies in JavaScript. Knowing these first will help you stay clear of common pitfalls when coding in JavaScript.

We’ll start by looking at the way the language treat semicolons. Then we’ll look at the troublesome == operator, discuss the consequences of forgetting to explicitly define variables, and explore ways to cope with these issues.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset