Last active
April 29, 2017 01:18
-
-
Save hrajchert/7dcad00ee935d472f74428d69df59f60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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