JSFiddle - React, Tailwind, and code Playground
JavaScript
function Inherited() {};
function Custom() {};
Custom.prototype.toString = function () {
return 'Custom toString';
}
var i = new Inherited();
var c = new Custom();
console.log(i.toString());
console.log(i + '');
console.log(c.toString());
console.log(c + '');