in reply to [OT] How do I really learn javascript?

Javascript is a seriously unexplained language (as you've found). One of the the few people I trust on JS is Douglas Crockford (currently working at yahoo, if you care about that kind of recommendation - if you don't: see http://www.crockford.com/ - oh hell, see it anyway).

It just so happens that he's recently written a book: javascript: the good parts. I haven't read it, though (haven't been able to get at it, yet); the semi-serious recommendation from comp.lang.javascript is still "Javascript: The Definitive Guide" from O'Reilly - which has some serious flaws but is a lot "wider", and probably the best book that handles "everything"- it discusses more or less anything with regards to browser-based javascript, but skips the really interesting details of the language. You should probably get both.

update: just for kicks: here's a short writeup I did on javascript inheritance which hopefully explains more than most books do about the subject.

update 2: just in case: yes javascript does support closures, but it has function scope instead of block scope, which makes for some pretty ugly constructs.

  • Comment on Re: [OT] How do I really learn javascript?