I keep coming across this syntax and I'm having trouble understanding exactly what it's doing:
export class SomeClass extends SomeParent {
constructor(...[configuration]) {
// lines of code that reference only "configuration"
}
}
Playing around in the Node REPL I can't find a difference between:
function foo(...[bar]) { console.log(bar); console.log(arguments) }
...and...
function foo(bar) { console.log(bar); console.log(arguments) }
...so what is it for?