And anti-answer: consider learning JavaScript from something other than a book. The publication cycle for conventional box is relatively long, relative to the pace of technology evolution.<p>By the time the author writes it, it's published, and you read it, the information can be dated, sometimes extremely so.<p>There are gobs of online resources, and the best resource is rarely mentioned: reading other peoples code.<p>Once you get a basic understanding, you can start right clicking on webpages, "inspect source", opening the console window, and looking at how pages actually work. The debugger and single stepping chrome are quite good.
Eloquent javascript is also fantastic.
<a href="http://eloquentjavascript.net/" rel="nofollow">http://eloquentjavascript.net/</a>
You don't know JS is a good book to start with and explains ES6 too.<p>It is available for free on github so you can evaluate before buying.<p><a href="https://github.com/getify/You-Dont-Know-JS" rel="nofollow">https://github.com/getify/You-Dont-Know-JS</a>
I found JavaScript: The Good Parts useful. It's very short and gets right to the point. The author focuses on the parts of the language people tend to use every day and highlights some gotchas and common mistakes that you might not expect (like == vs ===) if you're coming in from other languages.
Depends on what your level is going in.<p>For an <i>absolute</i> beginner, <i>JavaScript and jQuery</i> by Jon Duckett is extremely accessible. Sure, it covers jQuery but it's so well aimed at total beginners it's not a bad path.<p>At the lower intermediate level, Eloquent JavaScript (mentioned elsewhere) is fantastic.<p>At higher levels/if you know other languages and are comfortable learning new ones: Effective JavaScript, YDKJS, and Speaking JavaScript all fantastic and complement each other in various ways.
Secrets of the JavaScript Ninja, Second Edition along with You Don't Know JS are always my two recommendations. The two together shore up the weaknesses in the other.
Maybe check out Practical Modern JavaScript, which I wrote, which is free<p><a href="https://github.com/bevacqua/practical-es6" rel="nofollow">https://github.com/bevacqua/practical-es6</a>
This is a bit unorthodox, but I personally got a lot out of taking the LISP code in Structure and Interpretation of Computer Programs, and mentally translating the examples and solving the exercises in Javascript. There's apparently versions of the text around with the exercises pre-translated, though translating it myself was valuable to me.<p>Obviously, this will more teach you how to write good code that happens to be in Javascript, rather than taking an already-solid programmer and showing them the nitpicky details, idiosyncrasies, and browser APIs of Javascript.
I liked Zakas' books, the older one <a href="http://a.co/4e5JLrI" rel="nofollow">http://a.co/4e5JLrI</a> for the breadth and history and the concise update: <a href="http://a.co/2U97acq" rel="nofollow">http://a.co/2U97acq</a>
<a href="http://javascript.info" rel="nofollow">http://javascript.info</a> starts out simple enough for complete beginners but goes deep enough that even intermediate users can find new details.
Is it strange that when I consider learning a new language, I don't turn to books? My instinct is that I can learn more quickly and interactively online. Particularly JavaScript, as the browser you are using to browse the websites teaching you JavaScript is already a full JavaScript interpreter and development suite.<p>No waiting for your code to be processed server side, or anything like that. I pick up a book later on, commonly, if I know the language and want to know more about techniques for building something specific with it.
I think this question needs to be expanded upon before an adequate answer can really be given.<p>Are you looking to learn code via JS?<p>Are you proficient in another language that has similar constructs to JS and just need to understand the nuances?<p>Are you somebody who has understood JQuery on a low level but never understood what the code was actually doing?<p>I am sure there are a few more questions along similar veins and I think each one of these questions could be interpreted from the OP and I think all of these have potentially different answers.
"Eloquent Javascript" (<a href="http://eloquentjavascript.net/" rel="nofollow">http://eloquentjavascript.net/</a>) definitely gets my vote, as it starts with concepts that someone new to programming would need to understand before diving into the specifics of the language. Available to read online for free, although well worth spending money on a physical copy to thumb through, but it may be a little too slow to get going for someone who already has experience with other languages.<p>For developers, I'd recommend Kyle Simpson's "You Don't Know JS" books, in particular "This & Object Prototypes", followed by "Scopes & Closures". Well written, with plenty of example code, these are deep dives into specific areas which make Javascript different/weird. They're available to read in his Github repo (<a href="https://github.com/getify/You-Dont-Know-JS" rel="nofollow">https://github.com/getify/You-Dont-Know-JS</a>), but consider buying them, as he deserves to get paid.
Having conducted over 100 interviews for JS positions, here is my advice.<p>- You have to start with ECMA5. 95% of new features in later versions can be transpiled back to it, and examining resulting code is usually the easiest way to comprehend them. Oh, how many candidates I've seen that talk about 'modern classes' with a flare and then can't explain prototypical inheritance at all. So, the best start is "JavaScript: The Definitive Guide, 6th Edition".<p>- Be very careful about what you read online. Blog platforms are full of script kiddies trying to feed you their misconceptions without a second thought. I generally only 'trust' two sources - Mozilla Developer Network and <a href="http://2ality.com/" rel="nofollow">http://2ality.com/</a> by Axel Rauschmayer (I believe his books are mentioned in other answers too).<p>- Whenever you are faced with a particular library/technology - look from books/posts from their creators or someone associated with them.
FWIW, I started with Eloquent Javascript and moved on to You Don't Know JS. For me (self-taught type but with some experience, mostly use Python and Clojure) that seemed to do the trick, I'm working on a small Vue.js learning-type project right now and it isn't horribly blowing up, I feel lots more comfortable than I used to with JS, etc.
My advice is, first make sure you are going to learn the latest version of javascript, which is "Ecmascript2016" alias ES7 alias ES2016.
ES2015 (alias ES6) is also fine.<p>Previous versions of Javascript make JS a mediocre language, while ES2016 makes it a pretty good and powerful one. So try to look for a tutorial that is very recent and focused on the latest javascript idioms.<p>I think that if you already know how to program in at least one of the following languages: C++/C#/Java/Python, you will learn Javascript in no time, no need for a book, to be honest.<p>Javascript is a very simple language, my recommendation would be to start as follows:
1. First learn how to create a JSON (javascript object notation) object
2. Then understand how to define a function (better if you do it the ES6 way, that is, using the "=>" operator), and how to call it.
3. Learn how to use lists and hashtables(dictionaries).
4. After this, learn how to use JSON objects, that is, how to access each member of a JSON object. This will be trivial after step (3).
5. Then, learn the simple logic constructs: if, for, etc. They are easy, really.<p>Now comes the slightly more difficult part. I'm assuming you want to try Node.js development.<p>6. Learn what is the Node.js "event loop". IN other words, the philosophy behind Node and why most operations are "asynchronous" in Node.js. Learn about callbacks.
7. Now learn about "Promises" and learn how to use "async" and "await" to consume Promises easily. In other words, to program using asynchronous functions with no sweat.
8. Learn "express.js" web framework. It is really easy.<p>And don't forget to take a look to the ES6 and ES7 features and make sure you take advantage of them:<p>ES6
<a href="http://es6-features.org" rel="nofollow">http://es6-features.org</a><p>ES7
<a href="https://h3manth.com/new/blog/2015/es7-features/" rel="nofollow">https://h3manth.com/new/blog/2015/es7-features/</a>
I think it depends on your learning style & what you want to learn. <a href="http://jsbooks.revolunet.com/" rel="nofollow">http://jsbooks.revolunet.com/</a> is a great resource for free books.<p>If you want to learn concepts, You Don't Know JS by Kyle Simpson is great.<p>If you want to learn by doing, I would look away from books & more towards video based learning. It seems to have richer content in this style. Pluralsight, Frontend Masters, Egghead & Code School are all great. They also target different niches. If you're a complete beginner I suggest Code School. It does the best out of those at telling you where to start & what to learn next.
I highly recommend Secrets of the JavaScript Ninja by John Resig. It boosted my career significantly by giving me enough low-level practical understanding to become much more productive writing JS. Highly recommended.
JavaScript and JQuery - Murach. It's a two paged book. Left side you have text and right side you have code. So it is easy to get what they are explaining. Also they have good exercises to solve and learn.
This page is a good start if you would like to learn modern JavaScript and a framework at the same time: <a href="http://yoember.com" rel="nofollow">http://yoember.com</a>
As a webdev who used JS for a while without really knowing what was going on under the hood and just chalking "unexpected" behavior up to That Darn JavaScript(TM), reading You Don't Know JS: Scope & Closures was really great:<p><a href="https://github.com/getify/You-Dont-Know-JS/tree/master/scope%20%26%20closures" rel="nofollow">https://github.com/getify/You-Dont-Know-JS/tree/master/scope...</a>
I used this books.
Secrets of javascript Ninja -
<a href="https://www.manning.com/books/secrets-of-the-javascript-ninja" rel="nofollow">https://www.manning.com/books/secrets-of-the-javascript-ninj...</a><p>javascript : good parts -
<a href="https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742" rel="nofollow">https://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfo...</a>
If you are a beginner and looking for an engaging way to learn how to code using JavaScript, I would suggest Coding for Visual Learners (<a href="http://www.codingforvisuallearners.com" rel="nofollow">http://www.codingforvisuallearners.com</a>). It makes no assumptions on prior programming knowledge and teaches you the basics of coding using Javascript and p5.js in a very accessible manner.<p><i>Disclaimer: I am the author of the book</i>
I've only read parts, but Dr. Axel Rauschmayer has a few good books; Speaking JavaScript, Exploring ES2016, and more available free online here: <a href="http://exploringjs.com/" rel="nofollow">http://exploringjs.com/</a>. He also has an insightful blog here: <a href="http://2ality.com/" rel="nofollow">http://2ality.com/</a>
Yet another option, if you are experienced with other languages and want to learn JS: Javascript Enlightenment [1].<p>It only focuses on the concepts that make Javascript different from (let's say) Java.<p>Note: this is a pre-ES6 book.<p>[1]: <a href="http://www.javascriptenlightenment.com/JavaScript_Enlightenment.pdf" rel="nofollow">http://www.javascriptenlightenment.com/JavaScript_Enlightenm...</a>
As a supplementary resource rather than a primary learning guide, I found this site[1] to be profoundly helpful. It explains a lot of the intricacies, oddities, pitfalls and points of confusion in the language.<p>[1] <a href="http://bonsaiden.github.io/JavaScript-Garden" rel="nofollow">http://bonsaiden.github.io/JavaScript-Garden</a>
You don't know JS goes quite in depth into a variety of areas. Worth reading further down the road. <a href="https://github.com/getify/You-Dont-Know-JS" rel="nofollow">https://github.com/getify/You-Dont-Know-JS</a>
Learning Javascript 3rd Edition by Ethan Browne published by O'Reilly - is one of the few books for learning Javascript that have been published recently - that start you off with ES6. I have found it very useful. Highly recommended.
If you need to read and understand the source code powering popular frameworks then following is the best book.<p>JavaScript Patterns /
Build Better Applications with Coding and Design Patterns /
By Stoyan Stefanov
This one: <a href="http://shop.oreilly.com/product/0636920028857.do" rel="nofollow">http://shop.oreilly.com/product/0636920028857.do</a>
Do learn JavaScript the hard way on Zed's website. Once you know syntax read addy osmanis book on design patterns; Google engineer gives great examples.<p>Also; JavaScript the good parts