"No Repeats Please" Challenge

I’ve been trying to do this challenge for a while now and I’ve come up with this code so far.
I don’t understand what I’m doing wrong. When I do console.log(arr) it just shows an empty array.
Can someone help me figure out what’s wrong?

Your code so far

function permAlone(str) {
var regex = /(.)\1+/;

var arr = permutator(str, "");

arr = arr.filter(word => !regex.test(word));
return arr.length;
function permutator(string, permutation) {
  var results = [];
  if (!string.length) {

  for (var i = 0; i < string.length; i++) {
    permutation += string[i];
    var otherChars = string.slice(0, i) + string.slice(i + 1)
    permutator(otherChars, permutation);
    permutation = permutation.slice(0, permutation.length - 1);
  return results;


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0.

Challenge: No Repeats Please

Link to the challenge:

In your permutator function, if string isn’t empy (which it won’t be because you are passing the input string, then it will always return an empty array. results is initialized as an empty array, never modified, and then returned after the for loop completes.