JSFiddle - React, Tailwind, and code Playground
JavaScript
function funcA(something){
return {
funcB: function(bSomething){
alert("this is funcB, your parameter to funcA was " + this.aVar + " and you passed " + bSomething +" to this function");
},
aVar: something
};
}
funcA("'my value'").funcB("'my val b'");