function createPerson(name, age, job) { var o = new Object(); o.name = name; o.age = age; o.job = job; o.sayName = function() { alert(this.name); }; return o; } var person1 = createPerson("Mary", 29, "Software Engineer"); var person2 = createPerson("Mike", 27, "Software Engineer");