My colleagues often ask me how they can improve at JavaScript. I usually start by replying with the obvious (and correct) answer of “you need to write more of it”. However, since supplying only that answer would be a total dick move, I have also been casually gathering and pruning a list of [IMHO] the most important and/or confusing concepts in JavaScript.
The following is the short-list of JavaScript concepts that I feel one must understand before they can [eventually] achieve mastery of the JavaScript language.
- Truthy & Falsy:
http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/ - Prototypes:
http://javascriptweblog.wordpress.com/2010/06/07/understanding-javascript-prototypes/ - Variable scope and hoisting:
http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting - Closures & IIFEs:
- The `this` keyword:
http://javascriptweblog.wordpress.com/2010/08/30/understanding-javascripts-this/ - Functions — Intermediate
Functions are definitely the biggest and most important part of JavaScript. If you’ve never worked with a language that treats functions as a first-class citizen, it’s about time you did:- Function.call: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/call
- Function.apply: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/apply
- The `arguments` keyword:
- Functions — Advanced
Because of functions and closure, JavaScript can also apply lots of advanced concepts:
- Partial application and currying: http://benalman.com/news/2012/09/partial-application-in-javascript/
- Monads and promises: http://www.youtube.com/watch?v=dkZFtimgAcM
- More on Promises — Advanced
- Promises/A spec: http://wiki.commonjs.org/wiki/Promises/A
- My favorite Promises library, Q: http://documentup.com/kriskowal/q/
- jQuery Promises:
- Why do they exist?: http://terlson.blogspot.com/2012/09/why-do-jquery-promises-exist.html
- Chained and parallel asynchronous calls: http://terlson.blogspot.com/2012/09/promise-series-part-2-chained-and.html
What do you think?
Do you have any other “required reading” topics? If so, please add a comment and share any good articles/posts on the topic that you might like, too.
Reblogged this on บันทึกของวีร์ | Vee(r)'s Blog.
Reblogged this on Teknologi Marcapada.
Check this benchmark of promise performance. “when” is looking good compared to “q”
https://github.com/cujojs/promise-perf-tests#test-results
Not so much required reading topics, but I do have a list of required reading books that I put together recently. 🙂
http://designpepper.com/blog/books-every-javascript-developer-should-own