How to duplicate object properties in another object? [duplicate]

for(var k in firstObject) secondObject[k]=firstObject[k];

Leave a Comment