You can dehydrate this code to be:
$.each(substrings, function (index, value) {
            returnValue = (string.indexOf(value) !== -1);
            return returnValue;
        });

Let me know if you have a question about it