Javascript - determining if value in array is positive, negative (use switch)
<p>Ok so I'm trying to write some code to determine whether or not values in a static array are positive, negative or equal to zero.</p>

<p>So the array is populated and I'd use a switch statement to go through the values and output text depending on if it is above, below or equal to zero. </p>

<p>Here's some of the code I've been doing so far with this. </p>

<p>Please keep answers which pertain to the use of switches! Thanks in advance. </p>

<p>Note: I'm teaching myself JS, so I'm new to this. Here's my code so far:</p>

<pre><code>// JavaScript Document

var numbers=new Array();
numbers[0]="1";       
numbers[1]="2";
numbers[2]="3";
numbers[3]="-1";       
numbers[4]="-2";
numbers[5]="-3";
numbers[6]="0";



switch (numbers) {
    case "positive":
        if (numbers&gt;0) 
        {alert("DERP")};
    break;
    case "negative":
        if (numbers&lt;0) 
        {alert("NO DERP")};
    break;
   case "zero":
        if (numbers==0) 
        {alert("STILL DERP")};
    break;
}
</code></pre>
