JSFiddle - React, Tailwind, and code Playground
by lukemartin
HTML
<a href="#">Boing</a><br>
JavaScript
/* utils, ignore */
console.clear();
var b = document.getElementsByTagName('body')[0];
var f = function(m) {
b.innerHTML += m.toString() + '<br>';
}
/* /utils, ignore */
var l = document.getElementsByTagName('a')[0];
var d = false;
l.addEventListener('click', function(e) {
e.preventDefault();
f(d);
console.log(d);
if (!d) {
z();
}
}, false);
var z = function() {
//d = true;
}