[Solved] Find the string in array which doesn’t contain the character in JavaScript
Here is you your example code let wordarray=[“defeat”,”dead”,”eaten”,”defend”,”ante”,”something”]; word =”defantmsi”; posarray=”entfdenis”; function findMissingCharacters(str1,str2){ let result = [] //array which will be returned for(let letter of str1){ //check if str2 doesnot contain letter of str1 if(!str2.includes(letter)) result.push(letter); } return result; } let missing = findMissingCharacters(word,posarray); //filtering the wordarray let strings = wordarray.filter(word =>{ //this boolean will … Read more