Mini Linter Step 3


Hi. Im stuck in step 3. I have this code

let betterWords = storyWords.filter(word => !unnecessaryWords.includes(word));

When i console.log betterWords i keep seeing the unnecesaryWords.

I thought that filter would remove it.
Any ideas?
Thank you


given i wasn’t provided all the code, i had to implement it within my program, which i did:

[ 'Last',

it seems literally has successfully been removed. Unless you provide me with the full code to ensure no differences, it seems fine

project url for quick access

let overusedWords = ['really', 'very', 'basically'];

let unnecessaryWords = ['extremely', 'literally', 'actually' ];

let storyWords = story.split('');

let betterWords = storyWords.filter(word => !unnecessaryWords.includes(word));



see, that explains the problem (and why you should always include the full code)

log storyWords:

let storyWords = story.split('');

you cut each individual letter/character, which means your filter will never work, given a single character can’t equal words consisting of multiple characters (like extremely)


Yess!! Thank you! Thats right! I willpost all the code next time.