Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a firm understanding of HTML, CSS, PHP, MySQL (and to some extent apache/linux) and find that one of the things missing from my 'web development knowledge base' is javascript - creating richer user interfaces. I'd like to learn Javascript before I look at any frameworks (I've used light javascript/jquery before, but that's besides the point).

Can anyone recommend a firm book or online documentation from 'absolute beginner' to 'expert' for javascript? I seem to be finding too many 'display the time' and 'hello world' tutorials...

share|improve this question

closed as off-topic by MichaelT, ratchet freak, durron597, GlenH7, gnat Apr 17 at 18:25

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, ratchet freak, durron597, GlenH7, gnat
If this question can be reworded to fit the rules in the help center, please edit the question.

Not exactly a noob-to-pro-guide, but it gave me the right pointers: youtube.com/watch?v=hQVTIJBZook –  keppla Oct 6 '11 at 8:33
Thanks for the link, will take a look later when I'm at a computer with sound. –  Anonymous Oct 6 '11 at 8:36
I started trying to learn JS recently and was stuck in the same boat of 'lets do a Hello World!', I ended up just giving in and working doing the trial and Google learning method instead. –  Nicholas Smith Oct 6 '11 at 9:12
+1 for being in solidarity with the OP –  CamelBlues Oct 6 '11 at 15:58

5 Answers 5

up vote 26 down vote accepted

Douglas Crockford's book "JavaScript: The Good Parts" is generally considered one of the best books on JavaScript, because it aims to teach using JavaScript from the beginning in a way that stresses the strengths of the language and avoids bad practices (which are widespread in older JavaScript introduction texts).

Note: the video in the comments is a lecture based on the book.

share|improve this answer
Sounds like it's exactly what I'm after, thanks for taking the time to answer. :) –  Anonymous Oct 6 '11 at 9:09
But... JTGP doesn't teach javascript at all. It's a rant disguised as a spec. It's still good because it shows you what good practices are, but it's not a teaching book. –  Sean McMillan Oct 6 '11 at 14:07
@Sean: well, it's not a classic teaching book that tries to teach programming along with the language in question, but that ('hello world' tutorials) doesn't seem to be what Anonymous wants, and JTGP can certainly be used to teach JavaScript from the ground up to people who know other languages. –  Michael Borgwardt Oct 6 '11 at 14:23

I greatly enjoyed "The Good Parts", but as an introduction, I recommend "JavaScript: The Definitive Guide" by David Flanagan. It is around 1,000 pages and you'll find it rather cheap online, for example used on amazon.

It has been most useful for looking things up that I haven't found any good info on within 1 minute online.

Crockford also recommends that book. Once you know the basics, his website is really fun, too http://javascript.crockford.com/ btw.

share|improve this answer
A 1000 page book is an "introduction"? Geez. –  perp Oct 6 '11 at 14:08
Well, the core language is explained within 300 pages and I usually just use the whole thing as a reference book. You generally don't want to work yourself through a whole guide book, but look up specific sections and chapters. It is well structured, IMO. –  S B David Oct 7 '11 at 9:37
Sounds a good idea to me. If the usual tutorials are too tedious, throw yourself in the deep end WRT examples to analyse and projects to develop, and use Google or whatever to solve the inevitable confusions. –  Steve314 Oct 7 '11 at 12:57
+1: I found it to be a pretty quick read, and an extremely useful desk reference. –  kevin cline Oct 7 '11 at 13:31

Again Douglas Crockford, a series of video lectures that I really enjoyed: http://yuiblog.com/crockford/.

It is probably not exactly an absolute beginner to expert course but certainly another stone in the mosaic.

share|improve this answer
Thanks for the contribution, will add it to my list of things to sift through! –  Anonymous Oct 7 '11 at 11:15

Also I think that you can just start a convenient dive in with debugger, popular framework (non minified version) and its sources.

Take the jQuery, for example - how modules are organized, which idioms are used, notice the visual part - indents, naming conventions. Open one of their examples, set breakpoints in a firebug and start step in, step in, and so on. Take care on this, watch some variables, inspect values.

Yep, you have zero chances to get the idea how it works all together, but to understand some part (or to stare on some unknown syntax and check google what it means ) it is good enough. The other reason to take the popular framework is because usually it is coded pretty well.

share|improve this answer
I wouldn't take jQuery as a "high quality code" example nor as a "correct way to organize code". –  Raynos Nov 23 '11 at 16:50

I think you should go a step further and add HTML5 along with javascript to your repertoire. HTML5 goes hand in hand with javascript as javascript is the default client scripting language for it.

The only book that comes to my mind and is a great : - Head first HTML Programming

I am suggesting this book because i am reading it now and it's a treat. The book has great visualisation appeal and reading methodology.

Excerpt from the book cover

HTML has been on a wild ride. Sure, HTML started as a mere markup language, but more recently HTML’s put on some major muscle. Now we’ve got a language tuned for building web applications with Web storage, 2D drawing, offline support, sockets and threads, and more. And to speak this language you’ve got to go beyond HTML5 markup and into the world of the DOM, events, and JavaScript APIs.

share|improve this answer
That excerpt from the book cover makes me think the author is an idiot. I'd advice against that book, it uses buzzwords too much –  Raynos Nov 23 '11 at 17:25
LOL.... nothing as such....the book is a good read.....atleast for me......nice clean examples utilizing java....I copied the text straigh from amazon and sorry if u didnt liked that –  Pankaj Upadhyay Nov 23 '11 at 17:29
Wait, what? Examples using java ?! Definitely don't buy that book –  Raynos Nov 23 '11 at 17:34
Yaa, i misspelled. But, when realized i could not edit the comment. I meant as you should known, javascript and not Java for sure –  Pankaj Upadhyay Nov 23 '11 at 17:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.