JSFiddle - React, Tailwind, and code Playground
JavaScript
function run(arg) {
var a = true;
this.ran = this.ran || false;
if (!this.ran) a = false;
console.log(arg + ' ' + a)
/* code */
this.ran = true;
}
run('run();'); //false Good!
run('run();'); //true Good!
run('run();'); //true Good!
run.call(document, 'run.call(document);'); //false should be true
run.call(document.body, 'run.call(document.body);'); //false should be true
run.call(document.firstChild, 'run.call(document.firstChild);'); //false should be true