Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created December 2, 2015 21:57
Show Gist options
  • Save samueleresca/2012dc7906fe0bce08cf to your computer and use it in GitHub Desktop.
Save samueleresca/2012dc7906fe0bce08cf to your computer and use it in GitHub Desktop.
/*
*SIMPLE CLASS: describes telefilms
*/
var Telefilm = function (name, characters) {
this.name = name;
this.characters = characters;
};
Telefilm.prototype.getName = function () {
return this.name;
};
Telefilm.prototype.getCharacters = function () {
return this.characters;
};
Telefilm.prototype.addCharacter = function (character) {
return this.characters.push(character);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment