jQuery extend

by shraddhapaghdar

JavaScript

const firstObj = {
  name: "John Doe",
  address: { city: "Mumbai", country: "India" },
  age: 25
};
const secondObj = {
  address: { country: "United Kingdom" },
  phone: "7878954123"
};
console.log($.extend(true, firstObj, secondObj ));
console.log($.extend(false, firstObj, secondObj ));