The Little JavaScript Book
The Little JavaScript Book
$15.00
Minimum price
$20.00
Suggested price
The Little JavaScript Book

Last updated on 2019-10-13

About the Book

Why another book on JavaScript? I felt there was the need for a book which could take the reader by hand, challenging enough, yet concise. The Little JavaScript book saw its light originally in italian as "Il Piccolo Libro di JavaScript" and soon a lot of fellow developers asked for an english version.

What I did here however is not a 1 to 1 translation. "The Little JavaScript Book" is a creature on its own, with fresh contents and a different perspective.

In this book you'll learn (or re-learn) the "hard parts" of JavaScript without the gimmicky packaging that comes with some tutorials, and most important without arid academic lucubration. It aims to be a concise reference, while never peeking too much into the JavaScript spec.

Enjoy the reading!

About the Author

Valentino Gagliardi
Valentino Gagliardi

I've been in love with computers since I was 6 years old. In 1999 I was creating the first HTML pages and from there the web became my life. Today I help busy companies to embrace this crazy modern JavaScript stuff. 

Besides JavaScript I'm also active in the Python community. I serve as a coach for Django Girls, I speak at Python meetups and Pycon Italia. In my spare time you can find me in the countryside near Siena.

Table of Contents

  •  
    • Intro. Few words about the book
      • A brief history of the book
      • Structure of the book
      • Who this book is for?
      • Typographic conventions
      • What’s the best way for following the examples?
      • Errata and other requests
      • About the author
      • Acknowledgments
  • Part 1 - JavaScript, the “hard” parts
    • Chapter 1. Getting started with JavaScript
      • What is JavaScript?
      • Why should I study JavaScript?
      • ECMAScript, and other technical terms
      • A special note on modern JavaScript
    • Chapter 2. Prologue: JavaScript fundamentals
      • Strings, numbers, variables and all in between
      • Standing on the shoulders of a giant Object
      • 50 flavors of JavaScript functions
      • Conclusions
    • Chapter 3. A whirlwind tour of JavaScript engines
      • JavaScript engines and Global Memory
      • Global Execution Context and Call Stack
      • Asynchronous JavaScript, Callback Queue and the Event Loop
      • Callback hell and Promises
      • Promises and error handling
      • Promises and Microtask Queue
      • Asynchronous evolution: from Promises to async/await
      • Conclusions
    • Chapter 4. Closures and modules in JavaScript
      • Global madness
      • Demystifying closures
      • The need for closures
      • Hoisting, we need to talk
      • Conclusions
    • Chapter 5. The secret life of JavaScript objects
      • Everything is an object!
      • Creating and linking objects
      • Constructing JavaScript objects
      • Checking the “linkage”
      • Taking care of our JavaScript objects
      • Class illusion
      • Conclusions
    • Chapter 6. “This” in JavaScript
      • Demystifying “this”
      • Rule number 1: falling back to the global “this”
      • Rule number 2: when “this” is my host object
      • Rule number 3: tell me who is “this”
      • Rule number 4: “new” binding
      • Arrow functions and “this”
      • Conclusions
      • BONUS exercise: Creeping into “this”
    • Chapter 7. Types, conversion, and comparison in JavaScript
      • Primitive types in JavaScript
      • When a number becomes a string
      • I’m not a number!
      • Equal equal or not?
      • Primitives and objects
      • Conclusions
  • Part 2 - Working with JavaScript in the browser
    • Chapter 8. Shaping HTML elements with JavaScript
      • The Document Object Model
      • Nodes, elements, and DOM manipulation
      • DOM and events
      • Generating HTML tables with JavaScript
      • Code documentation in JavaScript with JSDoc
      • How to dynamically add DOM elements with JavaScript
      • Conclusions
    • Chapter 9. Working with asynchronous JavaScript
      • REST API and XMLHttpRequest
      • XMLHttpRequest in action: generating lists with HTML and JavaScript
      • Building HTML lists with JavaScript (and debugging classes)
      • Asynchronous evolution: from XMLHttpRequest to Fetch
      • Rebuilding the Fetch API from scratch (for fun and profit)
      • Conclusions
    • Chapter 10. HTML forms and playing with the storage API
      • A re-introduction to HTML forms
      • HTML forms in action
      • Extracting data from an HTML form
      • Getting to know localStorage and laying out our classes
      • Interacting with localStorage and “this” comes to bite again
      • Conclusions
    • Chapter 11. First steps with TypeScript
      • Laying down the foundations
      • Getting started with TypeScript
      • Digging deeper into TypeScript types
      • TypeScript types, objects, and interfaces
      • Narrowing types, Partial, and type aliases
      • Assembling a TypeScript class
      • Wiring up our classes and a bit of JSDoc
      • Conclusions
  • Part 3 - Appendix
    • Solutions
      • Chapter 2. Prologue: JavaScript fundamentals
      • Chapter 4. Closures and modules in JavaScript
      • Chapter 6. This in JavaScript
      • Chapter 11. First steps with TypeScript
    • Changelog

Authors have earned$8,076,481writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub