Skip to content

Eloquent JavaScript

Dušan Dimitrić edited this page Jun 11, 2016 · 9 revisions

Eloquent JavaScript

Eloquent JavaScript Book

This is a simply brilliant (and truly eloquent) programming book. Every JS developer should read this book and go through the examples and exercises as thoroughly as possible (it can get though). It's aimed more towards intermediate JS programmers but offers valuable insight to even the people that have been using the language for a longer while.

What I like about it the most is that it goes 'behind the curtain' and reveals how JS really works.

Notes:

I didn't take notes immediately when I've started to read the book so the first 13 chapters are missing but I'll surely re-read this book and add notes for those chapters too.

Chapter 14 - Handling Events

  • page 253 - A DOM node has only one onclick attribute, so you can register only one handler per node that way. The addEventListener method allows you to add any number of handlers, so you can't accidentaly replace a handler that has already been registered.

  • page 258 - keypress =/= keydown, keypress fires right after keydown (and is repeated along with keydown when the key is held) but only for keys that produce character input.

  • page 260 - Mouse dragging implementation example

  • page 260 - Mouse dragging example, mousedown event.preventDefault() prevents selection from happening

  • page 262 - Mouse hover intricacies

  • page 266 - Web Workers

  • page 268 - Debouncing - useful for "live search" AJAX implementation and mouse tracking (heatmapping)

Clone this wiki locally