John Resig, of JQuery fame, gave a great presentation on JavaScript at Northeastern University.
Also filed in
|
|
In my last post on constructors and objects in JavaScript, I mentioned that the logical OR operator || was short-circuited and allowed us to set default values for arguments passed into the constructor. So we know that the argument evaluates to false if we don't pass it in to the constructor, but what value does [...]
JavaScript doesn't have a "class" keyword or any formal class construct. Instead, functions are 1st class objects. When you write a function, you are essentially writing a constructor for a new object.
Here we are defining a object constructor called "newClass" and assigning some member values.
PLAIN TEXT
CODE:
function newClass() {
this.name = "newClass";
[...]
Charlie Calvert's Community Blog : Future Focus I: Dynamic Lookup: ""
Charlie Calvert is discussing a new feature in C# called dynamic lookup
The next version of Visual Studio will provide a common infrastructure that will enable all .NET languages, including C#, to optionally resolve names in a program at runtime instead of compile time. We call [...]