How to rewrite classes using closures in JavaScript | Hacker News Reader