Why is -1 being used when a method does not return a value?
<p>This statement simply checks an "@" symbol in a textbox.</p>

<pre><code>if (string1.indexOf("@")==-1){
 alert("Please input a valid email address!")
 document.example.email.focus()
</code></pre>

<p>This. <code>if (string1.indexOf("@")==-1){</code> why do we use -1 instead of 0. </p>

<p>it baffles me, since 0 is been used almost everywhere as a 'null' or 'empty' value. </p>
