Just JavaScript

An Idiomatic Approach

Buy Now: from your local Amazon


Paperback:
 228 pages Errata: None

    • Publisher: I/O Press; 1 edition (29 April 2018)
    • Language: English
    • ISBN-10: 1871962579
    • ISBN-13: 978-1871962574
    • Product Dimensions: 19 x 1.3 x 23.5 cm

 

Just JavaScript is an attempt to understand JavaScript for what it really is - a very different language that should not be compared to Java or dismissed as simply a scripting language. It looks at the ideas that originally motivated the JavaScript approach and also at the additions over time that have produced modern JavaScript/ECMAScript. It isn’t a complete introduction to JavaScript and isn’t for the complete beginner to programming. It has been written for those who are familiar with the basic constructs used in any programming language and have already encountered JavaScript.

After reading it, you will have an understanding how and why JavaScript is unique and the way in which you can exploit its strengths.

After a brief overview of its history, we come to the key idea in JavaScript: it is object-based. Everything in JavaScript is an object and three chapters are used to introduce objects before we meet the Function Object. The many different ways of creating a JavaScript function tends to hide the fact that they are indeed all objects with properties and a lifetime that is different from local variables. This is the reason closure is natural. Having explored JavaScript's unique approach to parameters we are ready to consider how functions become methods. After this factory functions and constructors seem obvious as does the prototype chain. The final three chapters tackle the issues that are usually seen as problems for JavaScript and which are now reconciled within the idiomatic approach.

Contents

  • JavaScript – Essentially Different

  •  In The Beginning Was The Object

  • Real World Objects

  • The Function Object

  • The Object Expression

  • Function Scope, Lifetime & Closure 

  • Parameters, Returns and Destructuring

  • How Functions Become Methods

  • Object Construction

  • The Prototype

  • Inheritance and Type

  • The Search For Type

  • Property Checking

About the Author 

Ian Elliot is the author of JavaScript Async: Events, Callbacks, Promises and Async Await, Just jQuery: The Core UI and Just jQuery: Events, Async & AJAX. He is a core member of the I Programmer team, and writes on all aspects of web development.

Buy Now: from your local Amazon