title: indexOf on node.js array returning -1 when it shouldnt
body: <p>for some reason my below code is returning -1 when it shouldnt has the number is in the array, see below:</p>
  
  <pre><code>for(var a in connectedSockets){
      console.log(connectionidArray);
      console.log(connectedSockets[a].userid); 
      console.log(connectionidArray.indexOf(connectedSockets[a].userid));
  }
  </code></pre>
  
  <p>gives the output:</p>
  
  <pre><code>[ 6 ]
  2
  -1
  [ 6 ]
  6
  -1
  </code></pre>
  
  <p>So the second time it should surely return 0?</p>