Skip to content

Instantly share code, notes, and snippets.

@tsh-code
Created October 2, 2018 10:59
Show Gist options
  • Save tsh-code/15dd4f81532e7948d81761ce900f0157 to your computer and use it in GitHub Desktop.
Save tsh-code/15dd4f81532e7948d81761ce900f0157 to your computer and use it in GitHub Desktop.
function Dog(name) {
this.name = name;
}
Dog.prototype.bark = function() {
console.log(this.name + ': Woof! Woof!');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment