JSFiddle - React, Tailwind, and code Playground

by btipling

HTML

<script type="text/javascript">
    foo = "bar";
    
    function testThis() {
      "use strict";
      this.foo = "foo";
    }
    
    console.log(this.foo); //logs "bar"
    testThis(); //Uncaught TypeError: Cannot set property 'foo' of undefined 
</script>