I am relatively new to JavaScript and keep seeing .extend and .prototype in third party libraries I am using. I thought it had to do with the Prototype javascript library, b
This seems to be the clearest and simplest example to me, this just appends property or replaces existing.
function replaceProperties(copyTo, copyFrom) { for (var property in copyFrom) copyTo[property] = copyFrom[property] return copyTo }