Similar to this question, I am wondering if experienced JavaScript developers have any websites they use with examples to get the basics of JavaScript down in 24/28 hours? I have looked at Douglas Crockford's Google Tech Talk and I bought the book "Javascript: The Good Parts", but I haven't had time to read it.
If you are starting with the W3Schools tutorial, you should get through that in just a couple of hours, at most. In the remaining time I would suggest watching the video lectures listed in the following blog article:
- Learning JavaScript Programming Language through Video Lectures by Peteris Krumins
The author of that blog article wrote very detailed points on each video talk, so you can get a very clear idea of what will be discussed. The talks are given by Douglas Crockford, John Resig and Nicholas Zakas - all significant figures in the JavaScript world. These should take quite a big chunk from your weekend, but they should serve as a very sound introduction for when you go through "The Good Parts" book.
JavaScript is a very expressive language, and I hope learning it will be fun. You can really sense the enthusiasm of the speakers in the above talks when they describe some of the good features of the language, such as closures and first-class functions. Enjoy!
If you're learning Javascript it's worth checking out jQuery and Prototype as they will help a lot with writing cross browser Javascript as well as some great resource for performing some of the trickier tasks in JS like animation, etc.
i second the W3Schools reference. I also like the Javascript Phrasebook, it's got real world examples with brief explanations of each one. Doesn't go into the history or theory of the language, which may be too much reading if you want to stuff as much as possible into one weekend.
Here is my list of really good resources to learn the language:
- Mozilla Developer Center: Core JavaScript 1.5 Guide
- Eloquent JavaScript (Interactive tutorial)
- Learning Advanced JavaScript (Interactive tutorial)
- QuirksMode (The prime source for browser compatibility information)
- A re-introduction to JavaScript (Great article)
- Douglas Crockford Video Series
- Introduction to Object Oriented JavaScript
- JavaScript Prototypal Inheritance
- ECMAScript Language Specification
Tools:
- A debugger
- Firebug for Firefox
- Dragonfly for Opera
- Developer tools (Safari / WebKit)
- IE8 Developer Tools
I was more or less in your situation. What I did was
I read "javascript, the good parts". It's a good book, but don't take it literally. For example, its use of objects, completely neglecting the new operator and the native object instantiation mechanism is frankly excessive. Hence, learn the prototype-based mechanism well.
take jQuery and learn it by using. Remember that jQuery is a great library to manipulate the web page DOM. add nodes, remove nodes, and much more. jQuery abstracts many browser dependent operations, so you don't go mad with browser incompatibilities.
tinker and when you find yourself in a troublesome spot, use FireBug to find the trouble. Make smaller examples, be very wary of variables introduced without the
var
keyword, and always keep into account thatthis
refers to the object owning a given routine, and this could be an unexpected one.
Javascript (and JS on the DOM) is a nice language, but its logic can be baffling sometimes. Don't give up. Once you get to understand how it works, it's rather intuitive.