JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test"></div>

JavaScript

'use strict';
(0, eval)("document.getElementById('test').innerHTML += 'indirect call running...<br>'; var b = 1;");
eval("document.getElementById('test').innerHTML += 'direct call running...<br>'; var c = 1;");
document.getElementById('test').innerHTML += 'indirect call: ' + ('b' in window ? b : 'not found!!!') + '<br>';
document.getElementById('test').innerHTML += 'direct call: ' + ('c' in window ? c : 'not found!!!') + '<br>';