Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

run function once javascript

function myFunction() {
  let value = 1 // change to random value
  if(document.getElementById("myId").innerHTML = value) {
    // do something
    
 myFunction == function(){}; // emptying my function after it is run once 
}}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #run #function #javascript
ADD COMMENT
Topic
Name
3+3 =