I'm using the following syntax and getting an error Unexpected token
when babel transpiles my script. But when I run the same script in their 'try it out' online compiler, it runs fine. What is wrong with my Object Destructuring and or Rest parameters?
function onDestructure({one,two,three,...ten}) {
console.log(ten)
}