Strategy pattern in Javascript | Hacker News Reader