Object - mmedrano9438/peripheral-brain GitHub Wiki
The Object() constructor turns the input into an object. Its behavior depends on the input's type. Object() can be called with or without [new], but sometimes with different effects.
`const o = new Object(); o.foo = 42;
console.log(o); // { foo: 42 } `
Object.assign(); 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. `const target = { a: 1, b: 2 }; const source = { b: 4, c: 5 };
const returnedTarget = Object.assign(target, source);
console.log(target); // Expected output: Object { a: 1, b: 4, c: 5 }
console.log(returnedTarget === target); // Expected output: true `