add permutations.js using recursion