Create an object constructor
function Person(firstName, lastName){
    this.firstName =  firstName;
    this.lastName = lastName;        
}  

var Saad = new Person("John", "Doe");

 

Result:


Leave a Reply

Your email address will not be published. Required fields are marked *