The question says it all really, I'm looking for book recommendations, video tutorials etc. I've been programming since I was about six so I don't need a book that spends 4 pages on for loops (thought that might be a Bad example [1] in terms of javascript).
Also I'm learning ASP.net at the moment so anything on interoperability features/issues would be welcome, though I'm guessing I just showed my ignorance with that question.
Edit: Now that Yahoo seem to have taken down the streaming versions of the older JavaScript videos, these Crockford on JavaScript videos look to be the best resource. The other ones are available for download - I've changed the links to point to the downloads.
Here are some new videos, which go over a lot of the same material as those above, but with some talk about about the new ES5 [1], and a nice computer science history lesson, leading up to the invention of JavaScript. I highly recommend these videos - they're very informative and entertaining, and the production quality is much higher that the previous three series.
Volume One: The Early Years [3]
Chapter 2: And Then There Was JavaScript [4]
Act III: Function the Ultimate [5]
Episode IV: The Metamorphosis of Ajax [6]
Part V: The End of All Things [7]
Scene 6: Loopage [8]
To expand on Flubba's answer, these are Douglas Crockford's Yahoo JavaScript videos in order. (I couldn't find a list of these in order anywhere, so I thought this might help a few people out...)
They really are very good at teaching the basics, especially if you have some programming background. He does a great job of making you not hate the language.
Douglas Crockford: "The JavaScript Programming Language"/1 of 4 [9] [M4V download]
Douglas Crockford: "The JavaScript Programming Language"/2 of 4 [10] [M4V download]
Douglas Crockford: "The JavaScript Programming Language"/3 of 4 [11] [M4V download]
Douglas Crockford: "The JavaScript Programming Language"/4 of 4 [12] [M4V download]
Douglas Crockford: "Theory of the DOM" (1 of 3) [13] [M4V download]
Douglas Crockford: "Theory of the DOM" (2 of 3) [14] [M4V download]
Douglas Crockford: "Theory of the DOM" (3 of 3) [15] [M4V download]
Douglas Crockford: "Advanced JavaScript" (1 of 3) [16] [M4V download]
Douglas Crockford: "Advanced JavaScript" (2 of 3) [17] [M4V download]
Douglas Crockford: "Advanced JavaScript" (3 of 3) [18] [M4V download]
[1] http://en.wikipedia.org/wiki/ECMAScript#ECMAScript.2C_5th_Edition:(
- Šime Vidas
Beyond question, the best resources are the videos from Douglas Crockford of Yahoo:
Also, his book - JavaScript: The Good Parts [1]
The more you know, the more you will get from these. These are not beginner introductions though even beginners will learn something.
Crockford is inspirational and extraordinarily rewarding to watch and listen to.
[1] http://rads.stackoverflow.com/amzn/click/0596517742I highly recommend the free, online book Eloquent JavaScript [1] by Marijn Haverbeke.
[1] http://eloquentjavascript.net/For JS-the-language, A re-introduction to JavaScript [1] is a good article. It doesn't spend too much time explaining the for-loops, but it does cover the interesting features of the language.
There's also the reference and the guide [2] on JS on the Mozilla Developer Center.
If you're really looking about information on learning how to do X in the browser, you need to learn DOM apart from JavaScript-the-language itself.
[1] http://developer.mozilla.org/en/docs/A_re-introduction_to_JavaScriptThe quick and lazy learner
A reintroduction to JavaScript on MDN
[1] lots of juice in few words, short to the point explanations
bonsaiden's Javascript Garden
[2] quick walk through the really important stuff you definitely must know
The slow learner
http://eloquentjavascript.net/ - a lot of words, long and deep intuitive explanations.
The future expert
MDN Guide
[3] for those who go deeper
Dmitry Soshnikov's "ECMA in detail" series
[4] - see the top right "Menu" button - for the JS experts doing magic with the language
The 3 books that everyone brings up
David Flanagan, JavaScript: The Definitive Guide
[5]
Crockford, Javascript the good parts
[6]
J Resig, Secrets of the javascript ninja
[7]
J Resig, Pro JavaScript Techniques
[8]
Ok, so more like 4 but anyway.
Quirks - learn them or they will bite you
wtfjs
[9] a collection of [...] irregularities
Here are some links I've collected:
Patterns
Inheritance
Module pattern
New keyword
Closures
Pass by reference / value
Teaching JavaScript
This keyword
[1] http://stackoverflow.com/questions/383402/is-javascript-s-new-keyword-considered-harmfulIn terms of interactive learning, I have been enjoying the new product that appendTo created for learning javascript. http://learn.appendto.com/
It starts from the basics and goes all the way into deep concepts.
While some of the material might be elementary for you, Jeremy Keith's DOM Scripting is a fantastic Javascript book. Jeremy also wrote Bulletproof Ajax. While I've not read that one, I've heard good things, and I suspect that those good things are correct, given DOM Scripting.
I'd go for Crockford's JavaScript: The Good Parts [1], it's short, concise, only talks about what matters, and focuses on how to get things done instead of showing you every single feature of the language -- actually, as the title suggests, he only shows you the good parts.
[1] http://oreilly.com/catalog/9780596517748/You must visit: www.quirksmode.org [1]
You must read: ppk on JavaScript, Pro Javascript Techniques, JavaScript:The Definitive Guide
[1] http://www.quirksmode.orgBefore reading any other books, I only recommend Javascript: The Definitive Guide [1]. It's actually been the only book recommended by a number of experts. It's extremely thorough, covers all the nuances of the language, and is very up to date on HTTP scripting/AJAX.
[1] http://oreilly.com/catalog/9780596101992/If you already know how to code, you will not need much to write some JavaScript. Just some study of existing code and of course, lots of practice.
For me, interesting topics were:
The Javascript koans are supposed to be good, though I haven't personally tried them yet (love the Ruby Koans they are modeled on). This article describes how to get started with koans for three languages including Javascript: Koans Projects: JavaScript [1]
[1] http://sett.ociweb.com/sett/settJan2011.html#javascript-koansLook at the source code of jQuery or some other framework. Javascript is a very powerful language if you know how to use it properly, and learning from others is the way to go.
There is a new startup called AppJet that sets out to teach people how to program.
I second the recommendation of Douglas Crockfords videos. I haven't read his book, but judging from the quality of his other writings on javascript [1], I would assume that it is worth reading.
I personally found Javascript: The Definitive Guide [2] to be of great help while I was learning my way around javascript.
[1] http://javascript.crockford.com/Essential JavaScript Design Patterns For Beginners [1] is a good place to go once you have the basic syntax down. It can be read within a few hours too. Warning, there is a very lengthy exposition on patterns in general before you get to the JavaScripty stuff.
[1] http://addyosmani.com/resources/essentialjsdesignpatterns/book/Try JS Info [1], not only JS others technologies are also present which are helpful
[1] http://javascript.info/Douglas Crockford on video again in a great google talk [1] February 27, 2009,
[1] http://www.youtube.com/watch?v=hQVTIJBZookCan't believe that the comp.lang.javascript FAQ [1] didn't get posted earlier. It's quite a nice resource, and linking many others, including the normative documents.
[1] http://www.jibbering.com/faq/As an experienced C programmer needing to 'convert' myself to JavaScript, I found the book 'Professional JavaScript for Web Developers' by Zacas (ISBN 978-0-470-22780-0) very helpful. But I found that no one resource was enough on its own. If you're a book-oriented person you'll probably end up with 2 or more books.
One catch for experienced programmers is that many/most JS books include elementary stuff about programming that will be a waste of time for you. I've found it really frustrating trying to find learning resources aimed at the experienced programmer. Before buying a book, look on the publisher's website & see if you can download free sample chapters to get a flavour.
As soon as you've got the basics, it'll be useful for you to learn about jQuery, for which an excellent book is 'jQuery In Action' by Bibeault and Katz (ISBN 978-1-935182-32-0). It's worth pointing out that the appendix, called 'JavaScript that you need to know but might not' is, in itself, an excellent introduction to JS for experienced programmers.
Some useful links:
JavaScript for C & Python programmers
[1]
Learning JavaScript from PHP - a Comparison
[2]
BTW one learning technique I found useful was to write notes in the form of a 2-column table, comparing features of a language I knew already (C) with analogous features in JavaScript. I ended up doing the same for PHP. If I ever get round to setting up my own website I might post these documents on it.
[1] http://www.wooji-juice.com/blog/javascript-article.htmlI am but an egg, but . . .
I really like "Test Driven JavaScript Development" by Chris Johansen. It's a midlevel book that requires some prior knowledge of JavaScript and maybe some familiarity with TDD. But it provides an excellent discussion of TDD as a tool for exploring a new language. It walks through some of the core JavaScript principles and their implications for program (and framework) design. It walks through several examples of test driven development, touching on minimal code to pass, stubbing, refactoring, test code refactoring.
The style balances discussion of principle and elaboration of detail nicely. At times I might wish for a little more, but then again figuring this stuff out is part of the game.
I came away from this with a much better grasp of JavaScript, development process, and design principles generally. I don't think I've gotten more from any single book.
The question comes from an experienced coder, who might not need these exposures, but maybe others will.
I learned quite a bit by going through the "Let's Make a Framework" series on DailyJS [1].
[1] http://dailyjs.com/tags.html#lmafHate to add more guff when there are so many existing answers, but http://www.codecademy.com is too good to ignore. A hand-held, interactive, web based learning tool for JavaScript. I'd give it to my non-programmer friends as well as my non-JavaScript programmer friends. It's excellent.
Note that the crockford lecture links have been changed. It looks as though Yahoo have consolidated the 4 separate sessions into one long video. It took me a while to find them because the web is full of the old (now broken) links, so to be helpful, here are the new ones:
Douglas Crockford — The JavaScript Programming Language (episodes 1-4 I think) http://yuilibrary.com/theater/douglas-crockford/crockford-tjpl/
Douglas Crockford — An Inconvenient API: The Theory of the DOM http://yuilibrary.com/theater/douglas-crockford/crockford-domtheory/
Codecademy is interactive - it's pretty sweet: http://www.codecademy.com/
This one is great!!! http://bonsaiden.github.com/JavaScript-Garden/
Has anyone tried this little gem Head First HTML5 Programming:Building Web Apps with JavaScript [1] ? It is by far the best book I have ever seen for newbie front-end developer. Yes, it is HTML5 book, but you are taught Javascript before HTML5. It goes on to introduce Javascript as foundation. Then it shows all the magic combining HTML5 and Javascript.
[1] http://rads.stackoverflow.com/amzn/click/1449390544I recommend Danny Goodman's book JavaScript Bible. I have the 4th edition, though a think the 5th is the current one. It's very comprehensive, and most chapters have exercises at the end. It's been a very useful resource.
JavaScript Bible is indeed in it's 5th Edition. In addition, JavaScript: The Complete Reference is a good book. Although they are references, I used them to learn the language.
I originally recommended W3schools [3] in this answer, but following a comment below I've decided to retract that recommendation. I do have some reservations of my own about W3schools -- for example, their PHP tutorial [4] teaches you to create SQL statements by naively smashing strings together -- a bad, bad practice that will leave your website riddled with elementary security holes.
[1] http://devguru.com/technologies/javascript/home.aspIf you want to learn little bit more than the typical 'HOW TO DO' samples and Javascript reference material available on web, you should really check out Javascript articles by Douglas Crockford [1]..
[1] http://www.crockford.com/Jeffrey Way's Javascript from Null [1] video series on NetTuts+ [2] is a nice an easy introduction if you are more a visual learner like me.
[1] http://net.tutsplus.com/tutorials/javascript-ajax/javascript-from-null-video-series/Here is a pretty good video Javascript Training Course [1]. It's great for beginners, but probably not great for someone who already has a programming background. It teaches the basics in an understandable way.
[1] http://www.learntoprogram.tv/javascript-training-course/for those who already knew several scripting languages well, may i introduce my little tutorial? http://xahlee.org/js/js.html covers the basics, very short. Gets you started quick.
I would like to suggest anything by this guy http://peter.michaux.ca/
Not so much a place to start or that structured but his articles are well written and cover some awesome topics.
Here is a the best videos ontwik.com/javascript [1]
JavaScript Patterns by Stoyan Stefanov
[1] http://ontwik.com/category/javascript/I'd start with the JavaScript tutorial [1] at w3schools. When looking something up in Google, I often tack "w3schools" onto the search string for a quick overview.
[1] http://www.w3schools.com/JS/default.asp