Created
November 12, 2012 21:55
-
-
Save ahoward/4062214 to your computer and use it in GitHub Desktop.
my latest favorite way to declare js classes...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
var Grid = new Function(); | |
Grid.initialize = function(){ | |
var args = Array.prototype.slice.apply(arguments); | |
var grid = new Grid(); | |
grid.initialize.apply(grid, args); | |
return grid; | |
}; | |
Grid.prototype.initialize = function(){ | |
var args = Array.prototype.slice.apply(arguments); | |
var grid = this; | |
// initialize that bad boy... | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sure!