I don't see any difference between the module pattern and the revealing module pattern examples. The privacy of local variables is maintained in both cases, it seems?
In the examples given, there is no difference. However in the revealing module pattern you can pick and choose which items you eventually "reveal" in the returned object. The items you choose not to reveal are then "private" as it were.
4
u/Gilgw Dec 19 '15
I don't see any difference between the module pattern and the revealing module pattern examples. The privacy of local variables is maintained in both cases, it seems?