how to find substring in a string in js case insensitive code example
Example: javascript string search case insensitive
function stringContainsCaseInsensitive(search, subject){
return subject.toLowerCase().indexOf(search.toLowerCase()) !== -1;
}
stringContainsCaseInsensitive("red","We painted the room red.");//true