function greet({ name = 'Rauno' } = {}) {
console.log(`Hi ${name}!`);
}
greet() // Hi Rauno!
greet({ name: 'Larry' }) // Hi Larry!
Although, I understand the basic functionality here... I don't understand what the need was to do greet({ name = 'Rauno' } = {}) instead of greet(name = 'Rauno'). Don't they achieve the same result? So, why?