JSFiddle - React, Tailwind, and code Playground

by Andrey

JavaScript

function o1 (){
	this.m1 = function(){
  	console.log('m1');
  }
  this.p1 = 'p1'
};

function o2 (){
	this.m2 = function(){
  	console.log('m2');
  }
  this.p2 = 'p2'
};




var o = new o2();

o2.prototype.m1 = o1.m1;
console.log(o);