JSFiddle - React, Tailwind, and code Playground

by nickxbs

JavaScript

function Person(name){
    this.name = name;
}

Person.prototype.handshake = function(){
    console.log(this.name + " handshake");
}

var nicola = new Person('nicola');
sandro.handshake();
console.log(sandro.constructor);
console.log(sandro.constructor.prototype.handshake);