JSFiddle - React, Tailwind, and code Playground

JavaScript

function A (){
		this.type = 'i am a-object'	
	}
	
	//instance of A 
	var a = new A();

	// B function constructor
	function B () {
		this.type = 'i am a b-object'
		this.intro = 'my protoype is a-object'
	}
	
	// Making B constructor prototype to a-object 
	B.prototype = a;
	
	// creating instance of B. 
	var b = new B();
	//	A.prototype.prop_added_later = 'i was added later';
	
	
	console.log(b);
	console.log(a);
	console.log(a.isPrototypeOf(b));