These are my recommended books for learning JavaScript.

Beginner

JavaScript for Kids by Nick Morgan

Eloquent JavaScript (free online) by Marijn Haverbeke

Intermediate/Advanced

You Don’t Know JS (free online) by Kyle Simpson

Effective JavaScript by David Herman

Speaking JS (free online) by Dr. Axel Rauschmayer

Exploring JS (free online) by Dr. Axel Rauschmayer

JavaScript Allongé (free online) by Reg Braithwaite

The Principles of Object-Oriented JavaScript by Nicholas Zakas

Learning JavaScript Design Patterns (free online) by Addy Osmani