JSFiddle - React, Tailwind, and code Playground
by Abdul Ahmad
JavaScript
function getOb() {
this.name = 'ob two';
const ob2 = {
name: 'ob inner',
send() {
this.name = 'on send inner';
console.log(this.name);
}
};
return ob2;
}
const theOb = getOb();
theOb.send();
console.log(theOb);