JSFiddle - React, Tailwind, and code Playground

by sujit km

HTML

<button type='button' onclick="myFunction">click</button>

JavaScript

var myFunction = (function() {
  var checkTrueMrk = false;  
  return function(){
    if(!checkTrueMrk){
        document.write("I will be called once");
        checkTrueMrk = true;
    }
  };
})();