In Javascript is there any difference between these two ways of adding a function to an object? Is one preferable for any reason?
function ObjA() { this.A
Using the object constructor will assign a copy of that function to every new instance of your object. Using prototyping will result in one function being shared across all instances.