Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var setName = function(yourName){
- this.name = "Your name is " + yourName;
- };
- var human = {
- setHumanName: function(name) {
- setName(name);
- }
- };
- human.setHumanName("hey");
- console.log(human.name);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement