Junaid Ahmed
Junaid's Blog

Follow

Junaid's Blog

Follow

Update dictionary in typescript

Junaid Ahmed's photo
Junaid Ahmed
·Aug 9, 2018·

1 min read

Play this article

const object1 = {
a: 1,
b: 2,
c: 3
};

const object2 = Object.assign({c: 4, d: 5}, object1);

console.log(object2.c, object2.d);
// expected output: 3 5

 
Share this