Wednesday, September 24th, 2008
Detailed JavaScript and Processing.js from John Resig
<>p>John Resig has given some great talks recently, and just posted about some of them.First, we have his interactive learning area where the presentation is just a JavaScript application that you can play with. Double click on the code, make a change, and save away!
The talk goes into the innards of the language that we are know, love, or at least deal with:
- Defining Functions
- Named Functions
- Functions as Objects
- Context
- Instantiation
- Flexible Arguments
- Closures
- Temporary Scope
- Function Prototypes
- Instance Type
- Inheritance
- Built-in Prototypes
- Enforcing Function Context
- Bonus: Function Length
The goal of all of this, is that after going through the presentation you should understand the following:
-
-
// The .bind method from Prototype.js
-
Function.prototype.bind = function(){
-
var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift();
-
return function() {
-
return fn.apply(object,
-
args.concat(Array.prototype.slice.call(arguments)));
-
};
-
};
-
Next up is his talk on Canvas, Processing and Processing.js. Everytime I see this stuff it makes me smile. Amazing visualizations are here:
Related Content:











Leave a comment