JSFiddle - React, Tailwind, and code Playground

by TheDiamondDoge

JavaScript

"use strict";

function foo() {
	console.log(this.toString())
  return {
    x: 20,
    bar: () => console.log(this.toString()),
    baz() {
      console.log(this.toString())
    }
  }
}

const obj1 = foo();
obj1.bar();
obj1.baz();