The Little JavaScript Book
$13.00
Minimum price
$18.00
Suggested price

The Little JavaScript Book

All you wanted to know about JavaScript but never dared to ask.

About the Book

Why another book on JavaScript? As much as I love masterpieces like "You don't know JS" and "Eloquent JavaScript" I feel there is the need for a book which takes the reader by hand, challenging enough, yet concise.

In this book you'll 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.

Bundles that include this book

$30.00
Suggested Price
$19.00
Bundle Price

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, and a glossary.
      • The importance of being 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
      • JavaScript’s module system
      • 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
      • More on Promise: combinators
      • Dynamic imports
      • 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. JavaScript encounters of the third kind (with objects!)
      • Everything is an object!
      • Creating and linking objects
      • Constructing JavaScript objects
      • Checking the linkage
      • Taking care of 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, coercion, and comparison in JavaScript.
      • Primitive types in JavaScript
      • When a number becomes a string
      • I’m not a number!
      • Comparison operators: 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
      • 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 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
      • Going idiomatic with FormData
      • The formdata event
      • 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
      • ECMAScript private fields and the TypeScript private modifier
      • Conclusions
  • Part 3 - Appendix
    • A delightful collection of little JavaScript recipes
    • 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$9,675,609writing, 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. 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) and MOBI (for Kindle). 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