JSFiddle - React, Tailwind, and code Playground
by JonVisc
HTML
<div id="test"></div>
JavaScript
function test(str) {
this.name = str;
$('#test').append(this.name);
}
test.prototype.getGeneric = function () {
$('#test').append('generic');
}
var test1 = new test('test1');
test1.getGeneric();
var test2 = new test('test2');
test2.getGeneric();
test.prototype.bam = function () {
$('#test').append(this.name + ' bam');
}
test2.bam();