I recently learned about this awesome method of declaring a function's variables using an object with preset defaults. Does this method have a name?
function test({var1= 'hello', var2= 'world'} = {}) { console.log(var1, var2); }
test(); // result 'hello world'
test({var2: 'universe'}) // result 'hello universe'
I am also not sure why it requires the object to be "= {}"