I'm trying to allow my user to enter a search term and then return the strings in the array that match all names they entered. So if they typed clinton here, it would find all the clintons, but if they searched hillary clinton, leaving out the rodham middle name, it would return hillary but not bill or chelsea.
const array = ['hillary rodham clinton', 'bill clinton', 'chealsea clinton', 'louise penny', 'amanda litman']
const searchTerm1 = 'hillary clinton' // should return hillary rodham clinton
const searchTerm2 = 'clinton' // should return hillary rodham clinton, bill clinton, chelsea clinton
const searchTerm3 = 'hillary' // should return hillary rodham clinton