var ModuelPattern=(function () {
var x="A"
var change=function(){
if(x==="A"){
x="B"
}
else{
x="A"
}
}
return{
x:x,
f:change
}
})();
ModuelPattern.f()
console.log(ModuelPattern.x)
I cannot figure out an way to update x inside IIFE using revealing-module pattern and access outside the Scope