Skip to content

Instantly share code, notes, and snippets.

@jameswomack
Created March 11, 2014 02:23
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 jameswomack/9478330 to your computer and use it in GitHub Desktop.
Save jameswomack/9478330 to your computer and use it in GitHub Desktop.
function DepartmentStore(name, location) {
this.getTitle = function () {
return name + ' ' + location;
}
this.setLocation = function (value) {
return location = value;
};
}
var atré = new DepartmentStore('Atré', '品川');
console.log(atré.getTitle());
atré.setLocation('原宿');
console.log(atré.getTitle());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment