title: NodeJS how to add objects to a set and iterate?
body: <p>This should be really straightforward but i haven't got it to work.</p>
  
  <pre><code>var Set = require("collections/set");
  
  function User() {
      this.name = 'something';
  }
  
  var clients = new Set();
  
  var a = new User();
  var b = new User();
  clients.add(a);
  clients.add(b);
  
  var arr = clients.toArray();
  for (var user in arr) {
      console.log(user.name+' iterated');
  }
  </code></pre>
  
  <p>Why am i getting:</p>
  
  <pre><code>undefined iterated
  undefined iterated
  </code></pre>
  
  <p>What i want to get is:</p>
  
  <pre><code>something iterated
  something iterated
  </code></pre>