Preface
JavaScript was born as a scripting language at the most inappropriate timeāthe time of browser wars. It was neglected and misunderstood for a decade and endured six editions. And look at it now! JavaScript has become a mainstream programming language. It has advanced literally everywhere: in large-scale client-side development, server scripting, desktop applications, native mobile programming, game development, DB querying, hardware control, and OS automating. JavaScript acquired a number of subsets such as Objective-J, CoffeeScript, TypeScript, and others. JavaScript is marvelously concise and an expressive language. It features prototype-based OOP, object composition and inheritance, variadic functions, event-driven programming, and non-blocking I/O. However, to exploit the true power of JavaScript, we need to have a deep understanding of language quirks. Moreover, while developing in JavaScript, we will become aware of its numerous pitfalls, and we will need a few tricks to avoid them. The project formerly known as EcmaScript Harmony, was just recently finalized in the specification named EcmaScript 2015, which is more often referred to as ES6. This not only brought the language to the next level, but also introduced a number of new technologies that require attention.
This book aims to guide the reader in understanding the upcoming and existing features of JavaScript. It is fully packed with code recipes that address common programming tasks. The tasks are supplied with solutions for classical JavaScript (ES5) as well as for the next generation language (ES6-7). The book doesn't focus only on in-browser language, but also provides the essentials on writing efficient JavaScript for desktop applications, server-side software, and native module apps. The ultimate goal of the author is not just to describe the language, but also to help the reader to improve their code for better maintainability, readability, and performance.