Javascript interview question/exercise | Hacker News Reader