Skip to content

Instantly share code, notes, and snippets.

@hrajchert
Last active April 29, 2017 01:18
Show Gist options
  • Save hrajchert/7dcad00ee935d472f74428d69df59f60 to your computer and use it in GitHub Desktop.
Save hrajchert/7dcad00ee935d472f74428d69df59f60 to your computer and use it in GitHub Desktop.
// ES6
function Perro (nombre) {
this.nombre = nombre;
}
Perro.prototype.hablar = function () {
console.log('woof');
// console.log('woof, soy', this.nombre);
};
function Gato () {
console.log('creando gato');
}
Gato.prototype.hablar = function () {
console.log('miau');
}
Gato.prototype._secreto = function () {
console.log('planes para conquistar el mundo aqui <--');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment