Home >Web Front-end >JS Tutorial >JS copies the attributes of all object s to object r (native js jquery)_javascript skills
Original writing:
for (var p in s) {
if (is_overwrite !== false || !(p in r)) {
r[p] = s[p];
}
}
return r;
}
It’s so convenient to write with jQuery
$.extend(a,b);
console.info(a);