title: Javascript object creation using literals vs custom constructor functions
body: <p>I understand that there are multiple ways to create an object in javascript and I have been reading that object literal syntax is generally preferred. (Correct?)</p>
  
  <p>What I haven't been able to figure out is if there is ever a reason to use any of the other ways to create objects, such as a custom constructor function (<code>var p = new Person("Adam")</code>)? Is it true to use a custom constructor function only if I want private variables or to add methods or properties to its prototype? Is there no way to do these in a literal?</p>