JSFiddle - React, Tailwind, and code Playground
by karthick6891
HTML
<script>
let one = 1;
var two = 2;
let foo = 13; // declarative environment record
let globalThis = {}; // object environment record
globalThis.foo = 14
</script>
<script>
// All scripts share the same top-level scope:
console.log(one); // 1
console.log(two); // 2
// Not all declarations create properties of the global object:
console.log(window.one); // undefined
console.log(window.two); // 2
console.log(foo); // 1
console.log(window.globalThis.foo); // 2
</script>
<script>
const x = "hola"
console.log(typeof x)
console.log(window.x)
</script>
<script>
console.log(typeof x)
console.log(window.x)
</script>