How to explain the parameter writing in function func ({a = b} = {}) {`} func method in JS grammar

these days, while learning the vuex source code, I see a

in the logger.js file. The parameter in the

function createLogger does not understand this. Does it mean that the object in the parameter is an empty object by default, and why the attribute in {} should be assigned with"= "instead of":".
ask for advice

Jul.19,2021

deconstruction assignment of ES6. Refer to the following example:

// a = 3, b = 4
{a, b} = {a:3,b:4};

// a = 3, b = undefined
{a, b} = {a:3};

// :a=3, b=2
{a=1, b=2} = {a:3};

// :
{a=1, b=2} = {}; // :a=1, b=2
Menu