obj proto

test proto

by bhupendra negi

JavaScript

// create object prototype 

var person = {
  getName: function() {
    return "Your Name is " + this.firstName + " " + this.lastName
  }
}

var p1 = Object.create(person);
p1.firstName = "goli";
p1.lastName = "Khan"
console.log(p1.getName());
console.dir(funnyGuy);