Removing duplicates from an array
I'll start by trying to address your concerns.


Unless in special cases you can't make this function run in less than quadratic time.  Typical linear time solutions in other languages involve generating hashes from values in the filtered array and then using a hash-table to filter out characters whose hash value appears to be the same.  There is no standard way to obtain a hash of an object in JavaScript, however, some objects may be uniquely written to string, which can be used as their hash.  So, there is an O(n) solution for an array of numbers, or an array of strings, but no such solution for an array of functions.  JavaScript makes no guarantees with regard to transforming tail calls into iterations, so, if possible, an iterative solution would be better than recursive one.
Yes, it's certainly better to let one function do one thing.


Now, to the interviewer reaction: Passing an interview and writing good code aren't necessary (and, most unfortunately, aren't in most cases) the same thing.  Interviewers typically want to see the code written in a particular way they believe it should be written.  If your goal is to pass the interview, it is in your best interest to find out the exact requirements.  Sad but true.

Now, assuming I would have to assess your code, here are the things that I'd find to be bad:


The code is too lengthy.  It shouldn't take that much space to write it. (I later give my version of the answer).
Inconsistent spacing and brace positioning.  This is certainly not a crime, but remember that I'm trying to assess your code from small cues.  I wouldn't mind this as much, if, for example, I knew that the code was a result of several people working on the same code base, using different editors etc.
Changing the iterator inside the loop.  Call me superstitions, but I'd make every possible effort to avoid it.
Comparison with Boolean constants.  There is no need to do that (unless for diagnostic purposes).  The language was designed in such a way that you never need to compare anything to true or false.  But if you will continue writing JavaScript code, you will find that a lot of people don't understand this trivial concept.
You've decided to make the algorithm a destructive one.  I.e. the function modifies the argument passed to it.  There are reasons for having both versions.  I, myself, expect the default to be non-destructive.
slice isn't really a way to go here.  Not that it matters a lot on JavaScript, since arrays are typically implemented as hash-tables with integer keys, but, in general, the properties of array data structure make repeated slicing a lot more expensive than maintaining the index of last insertion (example follows).
Using typeof and other kinds of ad hoc typechecking to me always smell bad.  There is a place for it, but in the context of this task it isn't required.




Non-destructive version:

function removeDuplicates(array, comparator) {
    var result = [], i;
    function insert() {
        var match, j;
        if (comparator) {
            for (j = 0; j &lt; i; j++) {
                if (comparator(array[j], array[i])) {
                    match = false;
                    break;
                }
            }
        } else match = result.indexOf(array[i]) == -1;
        return match;
    }

    for (i = 0; i &lt; array.length; i++)
        if (insert()) result.push(array[i]);
    return result;
}


Destructive version:

function deleteDuplicates(array, comparator) {
    var i, k = 1;
    function insert() {
        var match, j;
        if (comparator) {
            for (j = 0; j &lt; k; j++) {
                if (comparator(array[j], array[i])) {
                    match = false;
                    break;
                }
            }
        } else match = array.lastIndexOf(array[i], k) == -1;
        return match;
    }

    for (i = 1; i &lt; array.length; i++)
        if (insert()) array[k++] = array[i];
    array.length = k;
    return array;
}


Note that it would be possible to make it even shorter, if I knew that user-provided comparison function isn't needed (isn't part of the task).  I still chose to include the possibility, even though I wasn't sure about it because it seems like a good thing to include one in the function's interface.  If I had to answer this interview question, I'd probably not bother writing a custom comparator just to save time and spare myself the possibility of making a silly error working on something which wasn't absolutely required.