Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Persona = function (name) {
- this.name = name;
- }
- Persona.prototype.getName = function () {
- return this.name;
- }
- var thomas = new Person('Thomas');
- var amy = new Person('Amy');
- thomas.name // --> "Thomas"
- thomas.getName.call(amy);
Add Comment
Please, Sign In to add comment