var mix = function(r, s, ov) { if (!s || !r) return r; if (ov === undefined) ov = true; for (var p in s) { if (ov || !(p in r)) { r[p] = s[p]; } } return r; }; mix({name:123},{age:18})
var mix = function(r, s, ov) { if (!s || !r) return r; if (ov === undefined) ov = true; for (var p in s) { if (ov || !(p in r)) { r[p] = s[p]; } } return r; }; mix({name:123},{age:18})