jQuery toggleClass example

Toggle class name on click in jQuery

HTML

See Console

JavaScript

(function($){
    let myClosedOffObj = {
    	"you can't get me":"haha getting me would be useful but you can't cuz someone designed this wrong"
	};
    window.myClosedOffObj = myClosedOffObj;
    function spitItOut(){
        console.log('from inside',myClosedOffObj);
	}
	setTimeout(spitItOut,500);
	setTimeout(spitItOut,5000);
})(jQuery);
setTimeout(function(){
	myClosedOffObj["you can't get me"] = "Got you now sucker";
  console.log('set variable',myClosedOffObj);
},1000);
console.log('from outside',myClosedOffObj);