I have encountered an issue while implementing the Revealing Module Pattern, as I am struggling to expose a modified private property.
var myRevealingModule = (function(){
var name = 'Samantha';
function updateName () {
name = name + ' Smith';
}
return {
fullName: name,
set: updateName
};
}());
// Example usage:
myRevealingModule.set();
console.log(myRevealingModule.fullName); // Output is "Samantha" instead of the expected "Samantha Smith".