Simon Willson, a developer at Yahoo have created a presentation called A (Re)-Introduction to JavaScript. It is a very good introduction to javascript - and since it is in slide show format it is very easy to read.
If you don't know JavaScript, please go read it. If you know javascript, please go read it(he did'nt call it Re-Introduction without a reason). There is 111 slides - so it will take some time to read the full tutorial - but is it worth it. But then, I took a lot of time to read it not because it had a lot of text - but I had a slow connection and I had to download all the images one page at a time.
Slides
Low Quality but Faster Slides
High Quality copy of the Slides at Flicker
HTML Version of the Slides
One feature of javascript that I have yet not used was given in this slide show - the short-circuit logic.
The && and || operators use short-circuit logic, which means they will execute their second operand dependant on the first. This is useful for checking for null objects before accessing their attributes:
var name = o && o.getName();
Or for setting default values:
var name = otherName || "default";
Now to use it somewhere...
0 Comments:
Post a Comment