JSFiddle - React, Tailwind, and code Playground
JavaScript
function defining() {
ifstmt = true;
if(ifstmt) {
var ifscope;
ifscope = "yes";
}
console.log(ifscope);
}
function notDefining () {
ifstmt = false;
if(ifstmt) {
var ifscope;
ifscope = "no";
}
console.log(ifscope);
}
defining()
notDefining()