JSFiddle - React, Tailwind, and code Playground

by amindunited

JavaScript

console.log(this);

const myFn = () => {
	console.log('in the fn: ', this);
}

myFn();

class YourClass {
	
	constructor () {
  this.foo = 'bar';
  	console.log('in class', this);
  }
}

new YourClass();