JSFiddle - React, Tailwind, and code Playground

by PeeHaa

JavaScript

(function() {
    var attackValue = 'some value';
    
    function setValue() {
      attackValue = 'some other value';
    }
  
    console.log(attackValue); // this would output some other value, because the function did already run

    setValue();    
    
})();