title: How to loop through Node.js array
body: <p>How can I display the variables of the array?</p>
  
  <p>Code:</p>
  
  <pre><code>   console.log(rooms);
     for (var i in rooms) {
        console.log(i);
     }
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>{ rooms: 
         [ { room: 'Raum 1', persons: 1 },
           { room: 'R2', persons: 2 },
           { room: 'R3', persons: 3 } ] }
  rooms
  </code></pre>