Quick guide to implementing IEnumerable and IEnumerator on your custom data structures.
The revealing module pattern is a variation of the module pattern in which we declare ALL methods inside the function private scope, and we return an object with pointers to the methods that we want to make public.
Last week we saw how the module pattern could help us to structure our JavaScript code. But the use of the module pattern has some disadvantages that we must understand, to be able to apply this pattern correctly.
In previous post have seen how to create JavaScript objects literals, we also saw how we can use those to encapsulate parts of our code, creating de facto reusable modules. But if you come from Java, or .Net development you probably missed one thing: we haven't seen yet how we can define public, and private properties.
In this post we will see how we can use Objects Literals when doing JavaScript OOP.