JSFiddle - React, Tailwind, and code Playground
JavaScript
var foo = 1;
function bar() {
if (!foo) {
var foo = 10;
} // end if
alert(foo);
} // end bar()
bar();
var foo = 1;
function bar() {
if (!foo) {
var foo = 10;
} // end if
alert(foo);
} // end bar()
bar();