title: Can I create a property on a JavaScript object that's new every time it's referenced?
body: <p>In the code below, the output will be the same.</p>
  
  <pre><code>function dateObject() {
      this.date = new Date();
  }
  
  var wrapper = {
      dateObj: new dateObject()
  };
  
  console.log(wrapper.dateObj.date);
  
  setTimeout(function () {
      console.log(wrapper.dateObj.date);
  }, 3000);
  </code></pre>
  
  <p>I actually stumbled across this checking to make sure that the value of the property doesn't change, but now I'm curious. Is there a way to have a property that isn't a function, but rather the evaluation of a function, that will be new every time?  I ask because you can do it in other languages (think <code>System.DateTime</code> in C#).</p>