Advertisement
achshar

Untitled

May 14th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var setName = function(yourName){
  2.     this.name = "Your name is " + yourName;
  3. };
  4.  
  5. var human = {
  6.     setHumanName: function(name) {
  7.         setName(name);
  8.     }
  9. };
  10.  
  11. human.setHumanName("hey");
  12. console.log(human.name);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement