JavaScript Algorithms and Data Structures - ES6
Point 16 = Write Concise Object Literal Declarations Using Object Property Shorthand
This is the exercise to do:
const createPerson = (name, age, gender) => {
// Only change code below this line
return {
name: name,
age: age,
gender: gender
};
// Only change code above this line
};
Perhaps the 2 comment lines are a bit misleading, because it is necessary to change also the 2 outer curly brackets, which are just above and below the comments, to turn them into round brackets