Test name | Executions per second |
---|---|
Using the spread operator | 54205956.0 Ops/sec |
Using Object.assign | 3049310.0 Ops/sec |
const firstObject = { sampleData: 'Hello world' }
const finalObject = {
firstObject
};
const firstObject = { sampleData: 'Hello world' }
const finalObject = Object.assign({}, firstObject);