Is there a way for me to check if a string starts with the words "error" using javascript?
<p>I have the following:</p>

<pre><code>if (data == 'error') {
   mvcOnFailure(data)
}
</code></pre>

<p>Is there some way that I could change this so I check for a string that starts with "error" or "Error"?</p>
