MIRROR: javascript for 馃悳's, a tiny runtime with big ambitions
1function Person(first, last) {
2 this.firstName = first;
3 this.lastName = last;
4}
5
6Person.prototype.fullName = function () {
7 return this.firstName + ' ' + this.lastName;
8};
9
10const person1 = new Person('John', 'Doe');
11const person2 = new Person('Jane', 'Smith');
12
13console.log(person1.fullName());
14console.log(person2.fullName());
15
16console.log(Person.prototype);