/**
* @param {string[]} words
* @return {string[]}
*/
const sortedWord =(word)=> word.split('').sort().join('');
var removeAnagrams = function(words) {
for(let i = 1 ; i<words.length;){
if(sortedWord(words[i-1])===sortedWord(words[i])){
words.splice(i,1)
}
else{
i++;
}
}
return words;
};