In console I have: "Uncaught SyntaxError: Unexpected token." (row#2 => job.company:...)
function es6({ age, name, job.company: company}) {
var yearOfBirth = 2018 - age,
console.log(${ name } works at ${ company } and was born in ${ yearOfBirth }.);
}
In console I have: "Uncaught SyntaxError: Unexpected token." (row#2 => job.company:...)
${ name } works at ${ company } and was born in ${ yearOfBirth }.function es6({ age, name, job.company: company}) {
var yearOfBirth = 2018 - age,
console.log(
);
}
That's because of the comma at the end of the assignment.