title: How to remove all elements from hash and keep the reference
body: <p>I need to remove everything from a hash/object and keep the reference. 
  Here is an example</p>
  
  <pre><code>var x = { items: { a: 1, b: 2} }
  
  removeItems(x.items) ;
  console.log(x.items.clean) ;
  
  function removeItems(items) {
      var i ;
      for( i in items; i++ ) {
         delete items[i] ;
      }
  
      items.clean = true ;
  }
  </code></pre>
  
  <p>I was wondering if there is a shorter way to achieve this. For example, cleaning an array can be done as follows</p>
  
  <pre><code>myArray.length = 0 ;
  </code></pre>
  
  <p>Any suggestions?</p>