I want to learn Javascript. Give me an advice

8 points by aberatiu ↗ HN
Like the title says, I want to learn Javascript. I'm very impressed of what can be done with node, backbone.js, jQuery and all sorts of js libraries. For a noob like me, what you suggest as a starting point. Please be nice with me, I'm still learning. PS: I'm rather good at PHP, HTML and CSS3 and C, so I'm not that new to programming.

17 comments

[ 0.20 ms ] story [ 48.1 ms ] thread
If you're not new to programming, then I'd recommend a simple Javascript tutorial. You'll pick it up quickly.

For example, http://lmgtfy.com/?q=javascript+tutorial

That's obvious, but more than 90% of those tutorials are cr*p. You, for example, from where exactly did you learn Javascript?
(comment deleted)
(comment deleted)
Thanks man, this is exactly what I wanted. Owe you one LaterEdit: Isn't the page a bit old? I mean, 2006 is a loong way back in technology "time". Much has happend till now.
Javascript hardly changes. For beginning, that is perfect. There is also http://eloquentjavascript.net/ great for beginners, but too much yada yada for my tastes. Books recommended:

David Flanagan, JavaScript: The Definitive Guide

Crockford, Javascript the good parts

J Resig, Secrets if javascript ninja

J Resig, Pro JavaScript Techniques

Since you already know C, you also know most of JavaScript. The syntax is very similar. I would suggest loading up nodeJS and using it in REPL mode to work your way through the basics. printf = console.log() - without the formating :-(

Then starts the hard part of getting a handle on DOM. I recommend David Flanagan's "Rhino book" and Douglas Crockford's articles which you may find at www.crockford.com. In my experience Chrome and Safari developer tools let you explore effectively. Although reading the W3.org standards documents does help clarify difficult points.

Thanks a lot! The reason I'm starting to learn JS is that I want to create an app baset on node.js. The idea is there, but the skills aren't what they need to be :D
If you know some programming, you're kinda where I was when I started learning Javascript. I just jumped in using jQuery, because I wanted to write cross-browser code. Start by looking through the jQuery plugins website, find cool plugins you want to use, and incorporate jQuery plugins into your apps. Look through the plugin code to learn how it works. Then make your own plugins when you need them. For backbone.js, the online tutorials are good. You'll get the hang of it - good luck!
One silly question: Can a full app be created using only backbone.js, HTML and CSS? Something like a multiplayer game, for example?
Yes - it really depends on your needs. For example, i have recently done a ruby on rails backend, with backbone.js for frontend app. You can use PHP for backend, with backbone for frontend. In fact, that's a great place for you to start learning. Backbone.js will be used for your client-side code that runs in the browser.
Ignore w3schools. Don't get hooked/dependant on jquery/coffeescript/objective-j but do know how to use them. Get into the habit of things like progressive enhancement.