Use the algorithm JSHint uses for excludes instead of big-O(n^2) array element comparisons...