Created
September 12, 2017 19:48
-
-
Save urielhdz/ee108cabed077a6397c17d8b68db28dc to your computer and use it in GitHub Desktop.
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
class Human{ | |
constructor(name,lastName){ | |
this.name = name; | |
this.lastName = lastName; | |
//Asignamos el objeto actual como valor del contexto, y no cambiará | |
this.fullName = this.fullName.bind(this); | |
} | |
fullName(){ | |
return this.name + this.lastName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment