How JavaScript works: the factory design pattern and 4 use-cases | Hacker News Reader