Skip to content

Instantly share code, notes, and snippets.

@Seasons7
Created November 19, 2012 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Seasons7/4114874 to your computer and use it in GitHub Desktop.
Save Seasons7/4114874 to your computer and use it in GitHub Desktop.
dynamic new js object
var Seasons = function(){
this.name = "keisuke hata";
}
Seasons.prototype.sayHello = function() {
print("こんにちは!!");
}
var _global = this;
var seasons = new _global["Seasons"]();
print( seasons.name );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment