// Only change code below/above this line in this exercise wrong

Tell us what’s happening:
Describe your issue in detail here.
This Exercise expect the shorthand:

const getMousePosition = (x, y) => ({ x, y });

and the exercise is like this:
const createPerson = (name, age, gender) => {  
  // Only change code below this line
  return {
    name: name,
    age: age,
    gender: gender
  };
  // Only change code above this line
};

if people follow // Only change code below/above this line they won’t finish this , because they need to change code outside this zone to add ( and ) before and after the object.

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

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

So maybe just delete these two lines. :smiley:

   **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36

Challenge: Write Concise Object Literal Declarations Using Object Property Shorthand

Link to the challenge:

You can solve this challenge while respecting those two lines :slight_smile:

2 Likes

yes, you are right :smiley:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.