Is there an easy way to automatically add properties to objects if they don\'t allready exist?
Consider the following example:
var test = {} test.hel
let test = {}; test = {...test, hello: {...test.hello, world: 'Hello does exist!'}}; console.log(test);
When using the spread operator, the value can be undefined, it'll automatically create an object.