JSFiddle - React, Tailwind, and code Playground
JavaScript
var whatwhat = false;
document.body.innerHTML =
function() {
try {
if( whatwhat ) {
return "this should be returned";
}else {
return "but but..";
}
}
finally {
whatwhat = true; // not different scope
}
console.log(whatwhat); // bombed out by now
if( whatwhat ) {
window.alert('zomg');
}
}();
window.setTimeout(function() {
alert(whatwhat);
}, 500);