JSFiddle - React, Tailwind, and code Playground
by danShumway
JavaScript
//Let's make a function in the global scope.
function alertMessage() { alert("I got called"); };
function CheckThis() {
this.alertMessage();
}
//Now let's call the method. What happened?
var myObj = new CheckThis();//Doesn't work
CheckThis();//Works