Skip to content

Instantly share code, notes, and snippets.

View svlasov-gists's full-sized avatar

svlasov-gists

View GitHub Profile
@svlasov-gists
svlasov-gists / gist:2383751
Created April 14, 2012 11:31 — forked from padolsey/gist:272905
JavaScript: merge two objects
function merge(target, source) {
/* Merges two (or more) objects,
giving the last one precedence */
if ( typeof target !== 'object' ) {
target = {};
}
for (var property in source) {
body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
}
a {
color: #00B7FF;
}