javascript includes() case insensitive : <p>lets say I have an array of filter strings that I need to loop and check against with other passed in string.</p>

<pre><code>var filterstrings = ['firststring','secondstring','thridstring'];
var passedinstring = localStorage.getItem("passedinstring");

for (i = 0; i &lt; filterstrings.lines.length; i++) {
    if (passedinstring.includes(filterstrings[i])) {
        alert("string detected");
    }
}
</code></pre>

<p>How do I ensure that case sensitivity is ignored here (preferably by using regex) when filtering, if the <code>var passedinstring</code> were to have strings like <code>FirsTsTriNg</code> or <code>fiRSTStrING</code>?</p>
