Chapter 2. JavaScript Productivity Tips

This chapter will provide some basic syntax elements about JavaScript, just to get all readers to the same level. If you are comfortable with advanced JavaScript idioms, feel free to skip this chapter altogether. We are going to use the examples in this chapter to “stretch our legs” and get comfortable with the language[17].

Not for Beginners

This chapter is meant for developers familiar with the basics of JavaScript; it will not go through all the features of the language, but in particular over those that really make a difference when writing a large JavaScript application. And, of course, the criteria for choosing those features is entirely under the highly subjective perspective of the author of this book!

About JavaScript

JavaScript is the world’s most misunderstood language, which means that, as Yoda would say, you must unlearn what you have learned. However complicated it might seem at first, it is quite easy to write and understand the most complex of JavaScript codes with just some examples.

This page provides an excellent complement of information to know JavaScript better, as well as the Wikipedia page.

Some Coding Tips

When you are writing JavaScript code, the following tips might be of help:

  • In JavaScript, all the properties of an object are public, virtual, and overridable; that means that you can override the default implementation of any method on any object, or on any “class,” and provide your own implementation; this is, as you can ...

Get Mobile JavaScript Application Development 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.