JSFiddle - React, Tailwind, and code Playground
JavaScript
var outerobject={ a: 1, b: 2, c: function(){return this.a + this.b}};
var outerobject2={ a: 1, b: 2, c: console.log(this)};
console.log(outerobject.c());
function MyObject(){
this.a = 1;
this.b = 2;
this.c = this.a + this.b;
console.log(this);
}
var myObject = new MyObject();