JSFiddle - React, Tailwind, and code Playground

JavaScript

var x = "Global";

function foo(){
    alert(this.x);   // "Global"
}

foo();