What's the best book to read about JavaScript?
I am an old Java programmer and while I occasionally change Angular directives or play with Vue, I have little knowledge about the inner workings of JavaScript. I am afraid that most JavaScript books are outdated in a world ruled by transpilers and linters or they lay out the knowledge in a 'how-to' manner instead of explaining how-it-works.
9 comments
[ 2.9 ms ] story [ 26.2 ms ] thread- "Eloquent Javascript" is an excellent introduction to JS from the ground up: http://eloquentjavascript.net/
- The Mozilla Developer Network docs are a comprehensive set of references for the JS language and web APIs: https://developer.mozilla.org/en-US/docs/Web/JavaScript
- Dr. Axel Rauschmayer's books are the best "full reference" books for all of JS syntax and behavior: http://exploringjs.com/
- Kyle Simpson's "You Don't Know JS" is a deep dive into the way the JS language works: https://github.com/getify/You-Dont-Know-JS
I also have links to some additional meta-resources as part of my React/Redux links list: https://github.com/markerikson/react-redux-links/blob/master... .
http://javascript.crockford.com/
And be sure to check out WebAssembly which allows you to compile bytecode (wasm) and run in a browser VM:
https://developer.mozilla.org/en-US/docs/WebAssembly/Concept...
Good luck!
Coding Style: As a quick reference and to learn about some bad patterns (and how to avoid them), I can recommend the airbnb style guide [1]. They also link to eslint rules, which always have a reasoning why a rule is considered, e.g. the no new object rule [2]. A really interesting thing in the code style corner is prettier, which auto-formats source code pretty [3].
References: The Mozilla Developer Reference Manual, e.g. for String.match [4]. It also has explanations for browser APIs. To check if you already can use a certain browser feature, I recommend caniuse [5]
Now, as you also mentioned your an "old Java Programmer". I think it's quite interesting what goes on the JavaScript space and which features are ~~stolen~~ borrowed from which language. Good search queries to understand the language and it's features (especially the new ones) would be
- Javascript Classes vs Prototype
- Javascript Decorators
- Javascript Arrow Functions (Lambda)
- Node.JS Streams
- Reactive Extensions
- Flow vs. TypeScript
Well I hope that some of that info is usable for you, if you have any detail questions, please just comment :)
[1]: https://github.com/airbnb/javascript
[2]: http://eslint.org/docs/rules/no-new-object.html
[3]: https://github.com/prettier/prettier
[4]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[5]: https://caniuse.com/
1. JavaScript as programming language
2. JavaScript as a browser API
particularly helpful in so far as it lets me evaluate information in blogs and StackOverflow answers and elsewhere. Often these two different meanings of 'JavaScript' are interwoven and it created confusion for me.
Good luck.
His books transformed my understanding of Javascript. He basically bursted into the chest of Javascript, grabbed its beating heart, and then pulled it out and showed me (just like in "Indiana Jones and the Temple of Doom").
His series "You Don't Know JS" gives you a profound understanding of the language. It really teaches you why JS does all of the weird things it does.
I wasted a lot of time by not reading those books earlier.
If you wanna learn about the HTML 5 APIs, you should check out html5rocks.