Created
October 9, 2017 20:20
-
-
Save horaciod/fb74fc17da714326fa8d6915e0f3bdd3 to your computer and use it in GitHub Desktop.
creacion de objetos desde prototipos luego se cambia algo al prototipo y eso se hereda.
This file contains hidden or 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
function Bibliotecas() { | |
} | |
let b = new Bibliotecas(); | |
b.nombre = 'uno' ; | |
console.log(b); | |
console.log(b.__proto__) ; | |
// se pueden moficar las clases (prototipos) despues de creados objetos heredados y aspi y todo funciona. | |
Bibliotecas.prototype.abrir = function(){console.log('abierta'); }; | |
b.abrir(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment