Permutations with Heap's algorithm in JavaScript | Hacker News Reader