What does var prime = num != 1; mean?
<p>I know this is similar to <a href="http://stackoverflow.com/questions/1100159/javascript-variables-what-does-var-x-a-do">another SO question</a>, but the variable <code>prime</code> is supposed to be any number other than <code>1</code>, and it looks to me like it would be assigned the boolean value of <code>num != 1</code>.  Can anyone tell me what this line of code is actually doing?</p>

<p><strong>Here's the code where it's being used</strong></p>

<pre><code>function isPrime( num ) { 
  var prime = num != 1; // Everything but 1 can be prime 
  for ( var i = 2; i &lt; num; i++ ) { 
    if ( num % i == 0 ) { 
      prime = false; 
      break; 
    } 
  } 
  return prime; 
} 
</code></pre>

<p><strong>EDIT:</strong>
I assume that this line does something like this:</p>

<pre><code>if( num != 1) {
    prime = num;
}
</code></pre>

<p>But I still want to know <em>why</em> or <em>how</em> this line of code does this.</p>
