Skip to content

Instantly share code, notes, and snippets.

@amadeus
Last active December 17, 2015 01:28
Show Gist options
  • Save amadeus/5528243 to your computer and use it in GitHub Desktop.
Save amadeus/5528243 to your computer and use it in GitHub Desktop.
var Human = function(name){
this.name = name;
};
Human.prototype.getName = function(){
return this.name;
};
var ama = new Human('Amadeus');
ama.getName();
// Returns `Amadeus`
// In Atlas:
var Human = new Class({
initialize: function(name){
this.name = name;
},
getName: function(){
return this.name;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment