News for hackers. Stuff that matters.

Ask YC Hackers: What's the best text for learning Javascript?

For a long time I've treated Javascript as a "second class citizen" and eschewed it in favor of Scheme, Java, Ruby, and (lately) Erlang. Now that I'm managing and coding with not just server-side hackers, but hardcore UX hackers as well, I'm realizing that I would like to become a solid Javascript developer as well.

What's the best Javascript text for an experienced developer?

( 22 comments | 46 points | on HN )
Re:Ask YC Hackers: What's the best text for learning Javascr... by nickb on Sunday September 30, 2007 @02:00PM (#61330)
I've asked THE JS MAN himself, Doug Crockford of Yahoo!, what the best book on JS is and he says its: JavaScript: The Definitive Guide (5th Edition) by David Flanagan (edition is important... 4th one is not that good). Doug says a bit more about the lack of any good JS books:

"Bad Books

Nearly all of the books about JavaScript are quite awful. They contain errors, poor examples, and promote bad practices. Important features of the language are often explained poorly, or left out entirely. I have reviewed dozens of JavaScript books, and I can only recommend one: JavaScript: The Definitive Guide (5th Edition) by David Flanagan."

http://javascript.crockford.com/javascript.html

Also, make sure you watch his tutorial videos. They're awesome! There is a series of four intro videos and three advanced videos:

http://video.yahoo.com/video/play?vid=111593 http://101out.com/js_advanced.php

Re:Ask YC Hackers: What's the best text for learning Javascr... by henryw on Sunday September 30, 2007 @06:28PM (#61399)
It got it awhile ago at buy.com $19 w/ GCO. It might be easier to read on paper than PDF.

http://www.buy.com/prod/javascript-the-definitive-guide/q/lo...

Re:Ask YC Hackers: What's the best text for learning Javascr... by dfranke on Sunday September 30, 2007 @03:06PM (#61343)
I own the 4th edition and so far I've been happy with it. What has improved?
Re:Ask YC Hackers: What's the best text for learning Javascr... by asb on Sunday September 30, 2007 @04:24PM (#61365)
Straight from the author, what's new in the 5th edition: http://www.davidflanagan.com/blog/2006_08.html#000110
Re:Ask YC Hackers: What's the best text for learning Javascr... by brett on Sunday September 30, 2007 @02:00PM (#61329)
There's a lot of good stuff to read on Douglas Crockford's site (http://javascript.crockford.com/) including a good survey (http://javascript.crockford.com/survey.html).

I would also recommend his series of videos on js (I think they are from internal yahoo presentations). There are 3:

"The JavaScript Programming Language" http://video.yahoo.com/video/play?vid=111593&fr=

"Advanced JavaScript" http://video.yahoo.com/video/play?vid=111585

"Theory of the DOM" http://video.yahoo.com/video/play?vid=111582

Re:Ask YC Hackers: What's the best text for learning Javascr... by kirubakaran on Sunday September 30, 2007 @06:03PM (#61396)
"I know a friend" who googled for inurl:javascript.the.definitive.guide filetype:pdf
Re:Ask YC Hackers: What's the best text for learning Javascr... by seren6ipity on Sunday September 30, 2007 @06:19PM (#61397)
Convey my thanks to "your friend"
Re:Ask YC Hackers: What's the best text for learning Javascr... by jamongkad on Monday October 01, 2007 @11:02AM (#61612)
Very nice convey my thanks also.
Re:Ask YC Hackers: What's the best text for learning Javascr... by fauigerzigerk on Sunday September 30, 2007 @02:04PM (#61331)
I always found Mozilla's JavaScript site very helpful: http://developer.mozilla.org/en/docs/JavaScript

+1 on Flanagan

Re:Ask YC Hackers: What's the best text for learning Javascr... by waleedka on Sunday September 30, 2007 @01:31PM (#61321)
I recommend "JavaScript: The Definitive Guide". I read a couple of pages in B&N to see if it was any good, and it paid for itself right there.

edit: Get the 5th Edition. See nickb's comment.

Re:Ask YC Hackers: What's the best text for learning Javascr... by marrone on Sunday September 30, 2007 @01:58PM (#61328)
agreed.

Also check out 'Pro Javacsript Techniques' by John Resig.

Read this article on closures which is the best description I have read of such a crucial crucial aspect of the language: http://jibbering.com/faq/faq_notes/closures.html

Also read Crockford: http://javascript.crockford.com/

Re:Ask YC Hackers: What's the best text for learning Javascr... by altay on Monday October 01, 2007 @01:25AM (#61496)
John Resig's book is great. (He's the dude behind the jQuery library, and also a YC alum, FYI.)

I'd recommend that, and of course the Definitive Guide. Look for the Rhino.

Re:Ask YC Hackers: What's the best text for learning Javascr... by marrone on Monday October 01, 2007 @09:25AM (#61586)
wow, I didnt know Resig was a YC guy.
Re:Ask YC Hackers: What's the best text for learning Javascr... by bokonist on Sunday September 30, 2007 @01:37PM (#61322)
+! for "JavaScript: The Definitive Guide"

Once you have learned javascript, DHTML: The Definitive Reference is a great desktop reference, although it's less important now that javascript libraries are so good.

Re:Ask YC Hackers: What's the best text for learning Javascr... by pius on Sunday September 30, 2007 @01:04PM (#61313)
Interestingly, I just came upon a nice blog entry with several good web-based resources: http://www.juixe.com/techknow/index.php/2007/09/09/learning-...
Re:Ask YC Hackers: What's the best text for learning Javascr... by tokipin on Monday October 01, 2007 @10:25AM (#61603)
great page, thanks
Re:Ask YC Hackers: What's the best text for learning Javascr... by nickmerwin on Monday October 01, 2007 @01:19PM (#61648)
Coming from a Ruby background, Prototype will feel like a logical extension (enumerables and array helpers abound):

http://prototypejs.org/api

Knowing how to wield a library like Prototype or JQuery will increase your javascript speed and efficiency 10 fold!

Re:Ask YC Hackers: What's the best text for learning Javascr... by edw519 on Sunday September 30, 2007 @01:49PM (#61327)
Re:Ask YC Hackers: What's the best text for learning Javascr... by nick_a on Sunday September 30, 2007 @02:43PM (#61338)
Re:Ask YC Hackers: What's the best text for learning Javascr... by bdr on Sunday September 30, 2007 @05:09PM (#61381)
PPK
Re:Ask YC Hackers: What's the best text for learning Javascr... by niels on Monday October 01, 2007 @09:54AM (#61596)
No doubt: JavaScript: The Definitive Guide.
Re:Ask YC Hackers: What's the best text for learning Javascr... by PStamatiou on Sunday September 30, 2007 @01:38PM (#61323)
the rhino book by far.