JSFiddle - React, Tailwind, and code Playground
by Kikketer
HTML
<div id="preOut">pre out</div>
<div id="reader">out</div>
<div id="assigned">assigned</div>
JavaScript
var a = function() {
this.showToken = function() {
var cp = a.prototype.token;
document.getElementById('reader').innerHTML = a.prototype.token;
document.getElementById('assigned').innerHTML = cp;
}
}
a.prototype.token = 'abc';
document.getElementById('preOut').innerHTML = a.prototype.token;
var b = new a();
b.showToken();