JSFiddle - React, Tailwind, and code Playground
by Praveen Kumar Purushothaman
JavaScript
function Person (name, address) {
this.name = name;
this.address = address;
this.sayHello = function () {
console.log (this.name + " says hello!");
};
}
Person.prototype.getAddress = function () {
console.log (this.name + ": " + this.address + ".");
}
var Praveen = new Person ("Praveen Kumar", "104 Evington Road");
var Vennila = new Person ("Vennila Sundar", "104 Evington Road");
console.clear();
Praveen.sayHello();
Vennila.sayHello();
Praveen.getAddress();
Vennila.getAddress();