javascript assign

JavaScript
const obj = { a: 1 };
const copy = Object.assign({}, obj);
console.log(copy); // { a: 1 }

Source

Also in JavaScript: