JS interview question:
The Object.assign() static method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.
let aClone = { ...a };
let aClone = Object.assign({}, a);
could you implement Object.assign() with your own implementation ?
The Object.assign() static method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.
let aClone = { ...a };
let aClone = Object.assign({}, a);
could you implement Object.assign() with your own implementation ?