title: node.js hash, retrieve keys?
body: <p>Just started with Node.JS, maybe this is more a javascript question but, its a thin line.</p>
  
  <p>when i start-up node in CLI i do the following:</p>
  
  <pre><code>&gt; x = {num:1, str:'hello', ar:[1,2,3], func:function calc(i){return i *2}}
  </code></pre>
  
  <p>now i can say:</p>
  
  <pre><code>&gt; x.num
  &gt; x.str
  &gt; x.ar        // [1,2,3]
  &gt; x.ar.length // 3
  &gt; x.ar[0]     // 1
  &gt; x.calc(10)
  </code></pre>
  
  <p>thats pretty clear. But now i want know which keys x contains?</p>
  
  <pre><code>// this doesn't work 
  x.keys   // undefined
  x.length // undefined
  </code></pre>
  
  <p>So how do you retrieve the keys of this hash? </p>
  
  <p>And my second question is, what object is x ? how can i get the name of this object?</p>