TypeScript menemukan dengan semua kata

function multiSearchOr(text, searchWords){

   for(var i=0; i<searchWords.length; i++)
   {
    if(text.indexOf(searchWords[i]) == -1)
      return('Not Found!');
   }
   return('Found!');
}

alert(multiSearchOr("Hello my name sam", ["Hello", "my"]));
Mysterious Moose