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