Check if string can be rearranged into a palindrome
Your assumption is not quite correct.


Even number of letters: every letter must occur even amount of times (not necessarily twice)
Odd number letters: one letter must occur an odd amount of times, every other letter the same as above.


For example, aaa is a valid palindrome where no letter occurs once or twice.

As to your code, it is way too complex. If you look closely it has a complexity of \$O(n^2)\$, with n being the length of the string, because you have nested loops:
 you call findUnique() which contains a loop over the letters in a loop over the letters. 

You just have to count all the letters and check if there are letters with odd counts. If there are more than one letter with an odd counts the string does not satisfy the above palindrome condition. Furthermore, since a string with an even number letters must not have a letter with an odd count it is not necessary to check whether string length is even or not:


even + odd = odd
n * even = even


The function could look like this:

function canRearrangeToPalindrome(str)
{
    var letterCounts = {};
    var letter;
    var palindromeSum = 0;
    for (var i = 0; i &lt; str.length; i++) {
        letter = str[i];
        letterCounts[letter] = letterCounts[letter] || 0;
        letterCounts[letter]++;
    }
    for (var letterCount in letterCounts) {
        palindromeSum += letterCounts[letterCount] % 2;
    }

    return palindromeSum &lt; 2;
}