DEV Community

Anjali Gurjar
Anjali Gurjar

Posted on

JS Interview Question

const record=[{
id:1,
name:"Anjali",
age:12,
city:"bhopal",
salary:200

},

{
id:1,
name:"Anju",
age:18,
city:"vidisha",
salary:200

}]

const diff=[]
const [firstrecord,secordrecords]=record

for(let key in firstrecord){
if(firstrecord[key]!==secordrecords[key]){
diff.push(firstrecord[key],secordrecords[key])
}
}

console.log(diff)

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more