JAVASCRIPT - HOW TO Function for IndexOf to Find Multiple Values - Javascript Source Code

JAVASCRIPT - HOW TO Use One Function to do Multiple IndexOf Searches. If Any of the Multiple Index.Of Returns False, Function Returns False

Home Short:

Below is a simple function to look for the existence of multiple strings within another string using a loop that performs an index.of search in each loop. Any index.Of that return false, the function returns false..

Example of How to Use this Function to Test for Multiple Index.Of Values in a String

In the textbox below, change around and play with the list of comma separated list of words that appear in this sentence:

The Javascript function on this page allows a programmer to perform multiple index.Of tests in one simple function



S
H
A
R
E