let mystory = 'This is really a test on very set up is basically practices and literally not extremely true but actually false ';
let SPmystory = mystory.split(' ');
let overusedWords = ['really', 'very', 'basically','neo', 'literally'];
const MoreWords = SPmystory.filter(words =>{
check (words);
})
function check (words){
for(let i = 0; i < overusedWords.length;i++){
if(words !== overusedWords[i]){
//check to see if i increments and the output
console.log(i);
console.log(words);
//should return word that is not in the overusedWords array
return words;
}
else{
return 'same';
}
}
}
console.log(MoreWords);
Since the ‘return’ stops the for loop from incrementing what else can i use to check each string in my array?