JavaScript example of a Stack and a Queue implemented with Constructor, Module and Prototypal patterns