title: "phpjs" strpos function not returning true
body: <p>In translating a php script to js, I've used some functions from <a href="http://phpjs.org" rel="nofollow">phpjs.org</a>.
  However, it seems that the 'strpos' function does not return true under the same conditions.</p>
  
  <pre><code>$string = "aaa:bbb";
  $colons = strpos($string, ":");
  echo $colons;
  if ($colons == true)
      {echo "yup";}
  </code></pre>
  
  <p>echoes "3yup", however:</p>
  
  <pre><code>var string = "aaa:bbb";
  var colons = strpos(string, ":");
  console.log(colons);    
  if (colons == true)
      {console.log("yup");}
  </code></pre>
  
  <p>only echoes "3".</p>
  
  <p>Is this my mistake, a bug, or aspect of how javascript handles?
  And in any case, what method is recommended to get a <code>true</code> result for the presence of a colon in <code>string</code>?</p>
  
  <p>Thanks!</p>