I come from a C/Unix background, with a lot of experience in shell scripting, and some on Perl, elisp, etc. too. But now I'm getting into some work where I'll need to be developing interactive web-based interfaces, and I need to learn JavaScript. My problem is that all the resources I've found online for learning JavaScript seem to be targeted at an audience who's never programmed, and their authors don't seem much better. As soon as I see "validating user input to take the load off your server" as one of the great uses for JS, I want to scream and I feel like I can't trust anything else the author says. ;-)

Can anyone recommend good resources for an experienced programmer wanting to learn JS as a new language? Ideally I'd like to get started online, but dead tree recommendations would be welcome too, especially if I can preview them online.

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

Balance that out with the fact that Crockford comes across as (and IS, arguably) a zealot. He'll instruct you "not" to use parts of the language. Takes some with a grain of salt, as with all Zealots :) But really, +1 for a good book.
–
Alex McpOct 18 '10 at 3:40

Yeah, I just previewed it on Google. As an example of what you're saying, I'd heard about type conversions using -0, |0, etc., which I love coming from using things like 0U+ to convert to unsigned in C, but I get the feeling he strongly disapproves of this sort of usage.. ;-)
–
R..Oct 18 '10 at 4:30

My advice: Forget what you know about object oriented programming. Attempts to apply the inheritance paradigms from an OO language have repeatedly overcomplicated many, many chunks of JS code.

Prototyping is not Class construction. Object instantiation is not Class instantiation. "Classes" are not real.

There are ways to get what you want. You can even have something akin to privates - but they are not methods or members. They are merely locally scoped. Inheritance is often faked, but with mixed results, and universally at the expense of data hiding.

Javascript is prototyped. It is not object oriented. Keep that in mind every time you think something like, "Man, an interface here would be awesome..."

Take a look at Eloquent JavaScript. It doesn't cover everything, but it will move you towards idiomatic JavaScript programming -- things like functional programming, closures and prototypes. (The online version comes complete with a sandbox tutorial environment.) The rest, after all, is just knowing how to use references.

Nooooooooo. Unless they've rewritten most of it since I last looked, I wouldn't recommend w3schools. Its tutorials range from passable down to outright wrong, averaging out at misguided.
–
Tim DownOct 18 '10 at 8:33