So in the MDN documentation for destructuring function defaults it gives the following example.
function drawES2015Chart({size = 'big', cords = {x: 0, y: 0}, radius =
25} = {}) {
console.log(size, cords, radius);
// do some chart drawing
}
drawES2015Chart({
cords: {x: 18, y: 30},
radius: 30
});
However I can run this example with the first line as function drawES2015Chart({size = 'big', cords = {x: 0, y: 0}, radius =
25})
so leaving out the ={}
part. I'm not sure why this works and what the advantages would be to using the longer form if the shorter form is in fact equally correct.