title: how to tell if a javascript variable is a function
body: <p>I need to loop over the properties of a javascript object.  How can I tell if a property is a function or just a value?</p>
  
  <pre><code>var model =
  {
      propertyA: 123,
      propertyB: function () { return 456; }
  };
  
  for (var property in model)
  {
      var value;
      if(model[property] is function) //how can I tell if it is a function???
          value = model[property]();
      else 
          value = model[property];
  }
  </code></pre>