Used in conjunction with destructuring assignment defaults

function foo({x, y = 5} = {}) {
  console.log(x, y);
}
foo() // undefined 5
Comments