I have an array of 800 sentences. I want to remove all duplicates (sentences that have the same exact words, but in different order) from the array. So for example \"this is
Sort the array of sentences, and then loop through it and delete an item if it is the same as the previous one:
texts.sort();
for(var i = 1; i < texts.length; i++){
if(texts[i] === texts[i-1]){
texts.splice(i,1);
i--;
}
}
I tested this in an array with 800 strings, and it seemed reasonably fast.
EDIT: Sorry, didn't read your question very carefully