JSFiddle - React, Tailwind, and code Playground
by damir aushenov
JavaScript
alert(Date.prototype.getDate);
var Person = function (firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
};
Person.prototype.getFullName = function () {
return this.firstName + " " + this.lastName;
};
Person.prototype.greet = function (person) {
if (person instanceof Person) {
return "Hello, " + person.getFullName();
} else {
return "Hello, there!";
}
};
var person = new Person("John", "Doe"),
person2 = new Person("Jane", "Doe");
alert(person.greet(person2));