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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.