

Learn JavaScript  - lichengcai
http://stackoverflow.com/questions/11246/best-resources-to-learn-javascript

======
dave1010uk
I think the first step is understanding that there is JavaScript (the
language), then there is the browser's Document Object Model (DOM) and "HTML5"
APIs. The JavaScript language is used in more places than just browsers (e.g.
Rhino and Node.js) and doesn't change very rapidly. The DOM and APIs vary more
across browsers and get new features with just about every browser release.

I'd recommend learning the language first, then the basics of the DOM and
subscribing to the main browser's blogs to keep up with their changes.

If you just want a site to learn JavaScript, I'd highly recommend
<https://developer.mozilla.org/en/JavaScript> (as other people have too).
Mozilla's docs are top-notch. They're a wiki so sign up and help make them
even better.

------
peregrine
Best way to learn javascript is to type CTRL+SHIFT+I(in chrome I think its f12
in others) and look at the code. Chrome will even de-obfuscate it for you
automatically. Step through the code, maybe write some script in the console,
go through some resig tutorials.

I really liked looking at the underscore.js literate source but thats a little
more theoretical than practical.

Also if you are just learning javascript you might as well learn jQuery
because it will do a huge chunk of your basic practical needs. If you are
learning javascript to really understand the language or build something super
complex you may wanna watch the crockford videos and understand prototypes and
those things. Otherwise jQuery will probably cover you.

~~~
spjwebster
I'd advocate learning JavaScript, learning the DOM and BOM, and only then
learning a JavaScript framework like jQuery or YUI. Sooner or later you'll
need to do some pure JavaScript development, and you'll need to know how to
handle events or traverse the DOM without jQuery holding your hand. I say this
as someone who has interviewed candidates for pure JavaScript roles who
thought the terms jQuery and JavaScript were interchangeable.

------
Yhippa
Does anybody have a link to some good JavaScript exercises? One answer is "why
don't you just try building something" but I personally learn better from
progressing through exercises versus doing the "just build anything" or
watching videos.

~~~
nwhitehead
I just put up an interactive javascript tutorial. It starts simple then builds
up to passing around functions, closures, continuations. Give it a try and let
me know what you think. <http://nathansjslessons.appspot.com/>

~~~
Yhippa
Nathan, great tutorial! This is why I love HN. It reminds me of some of the
interactive Ruby tutorials I've done. You've really got something going here.

------
01Michael10
I have been looking to go beyond HTML/CSS and learn some JavaScript (HTML5
also) myself. Bookmarked the online book Eloquent JavaScript a while ago and I
have been meaning to read it. <http://eloquentjavascript.net/>

My local hackerspace, the Buffalo Lab is hosting the first meeting of the
Buffalo JavaScript Club which is tomorrow. I am hoping this will jump-start
me... <http://www.meetup.com/hackerspaces/events/25855541/>

------
ThomPete
I've said it before.

Sign up for Lynda.com watch the JavaScript videos a couple of times and then
get started.

I found that when something gets turned into a video a lot of the un-necessary
and verbose ness get taken out. Plus you get the advantage of the tutor
putting the right emphasis on the right words.

I have learned quite a few things that way.

------
callmeed
I have always wondered–is there an obvious/definitive JavaScript reference
site like <http://php.net/manual>, <http://ruby-doc.org>, etc.? Is it the
mozilla site?

~~~
jameswragg
The best JavaScript reference is almost certainly the Mozilla docs:
<https://developer.mozilla.org/en/JavaScript>

------
pbhjpbhj
I've summarised the most recommended resources here and on SO in a blog post
at <http://alicious.com/javascript-tutorials/> (aff links abound, sorry if
that bothers you).

------
Androsynth
1-write lots of jQuery code. It has a dead simple api; hides most of the
ugliness of the language; it slowly introduces you to closures (as opposed to
Crockford, who loves them) 2-once you have that, then read Crockford

~~~
ionfish
Please don't give out advice like this. I'm really fed up with having to
deprogramme people who've written too much jQuery and don't actually know
JavaScript, or worse, barely realise that there is such a language.

I appreciate that your suggestion is to learn jQuery and then go through a
language reference, not to stop once you've done the jQuery bit, but trust me,
that's just what most people will do.

jQuery is a very opinionated library, which is fine in and of itself, but that
makes it a terrible introduction to JavaScript, precisely because it "hides
most of the ugliness of the language", as you put it.

To understand why this is a problem, consider the following points.

1) jQuery is not the only DOM library out there. Prototype, MooTools, Dojo and
YUI are just some of them. To be a good front-end developer one should know at
least a couple, and be able to learn any of them. The easiest way to learn
them is to know the language and just learn a library, rather than learning a
bunch of different DSLs with perhaps a few unifying themes.

2) JavaScript is now used on the server as well, and to write server-side
JavaScript one really does need to know the language.

3) If one ever wants to write anything beyond hacky little scripts—a real web
application, for example—then one cannot get away with just knowing jQuery.
Large applications must be structured. The rats' nest of callbacks that many
jQuery programmers seem to think is sufficient and even appropriate
application design will not scale to large codebases. The key skill here is
knowing what sort of structure needs to be introduced and being able to use
both use libraries which provide the necessary abstraction and write one's own
where necessary.

~~~
Androsynth
I didn't say stop at jquery. But I do think its the easiest introduction to
the language for someone with no functional background. If they stop there,
that's they're fault. Once they learn an easy subset, its much easier to
transition into the intermediate to advanced parts of the language. Regardless
of programming language, if someone stops learning as soon as they can write a
functional script, they're a bad dev.

------
gerbera
Here are some good videos for you guys looking to get into javascript and
jquery

<http://learn.appendto.com/lessons>

------
steilpass
Go to a user group: <http://communityjs.org/>

------
robjohnson
I've been meaning to learn JS for a while now, thanks for all of the resource
links.

