JSFiddle - React, Tailwind, and code Playground

JavaScript

var sentences = [
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'Vivamus aliquet nisl quis velit ornare tempor.',
    'Cras sit amet neque ante, eu ultrices est.',
    'Integer id lectus id nunc venenatis gravida nec eget dolor.',
    'Suspendisse imperdiet turpis ut justo ultricies a aliquet tortor ultrices.'
];
            
var words = ['ipsum', 'amet', 'elit'];
    
$(sentences).each(function() {
    var s = this;
    alert(s);
    var notFound = true;
    $(words).each(function() {
        notFound = s.indexOf(this) == -1;
        if(!notFound) { 
            alert('found ' + this);
        }
        return notFound;
    });
    return notFound;
});