Memoization and recursive functions in JavaScript | Hacker News Reader