Article
Result 161
Creating an object using a constructor function in JavaScript
// Creating an object using a constructor function function Person(firstName, lastName, age) { this.firstName = firstName; this.lastName = lastName; this.age = age; this.greet = function() { console.log("Hello, " + this.firstName + " " + this.lastName); }; } v...
View Details
/article/read/82/2515