JSFiddle - React, Tailwind, and code Playground

JavaScript

var foo = 1;

(function(){
    var foo = 2;
})();
alert(foo);