ES6 lesson correction

Hello,

I hope this is the right place for this. For the lesson " Write Concise Object Literal Declarations Using Object Property Shorthand", I had to edit code outside of the comments “// Only change code below this line” and // Only change code above this line". I had to delete the {} brackets that surround it.

CODE BEFORE:
const createPerson = (name, age, gender) => {

// Only change code below this line

return {

name: name,

age: age,

gender: gender

};

// Only change code above this line

};

CODE THAT COMPLETES THE LESSON
const createPerson = (name, age, gender) =>

// Only change code below this line

({name,age,gender});

// Only change code above this line


const createPerson = (name, age, gender) => 
// Only change code below this line
({name,age,gender});


// Only change code above this line

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36.

Challenge: Write Concise Object Literal Declarations Using Object Property Shorthand

Link to the challenge:

You removed the curly braces around the body of the function. If you leave the default code exactly the way it is (including those curly braces) then you only need to edit the code inside the curly braces of the return statement.

That is one way to solve the challenge, but there is a solution that does not require that edit.

Ok thank you. I will try that.

Thank you, I will try that.