Write Concise Object Literal Declarations Using Simple Fields not working

Write Concise Object Literal Declarations Using Simple Fields not working
0

#1

I need some help, pls!
This test makes me a joke I think.
age is not defined , how to hell?

Your code so far


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

  // change code above this line

console.log(createPerson("Zodiac Hasbro", 56, "male")); // returns a proper object

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields


#2

too many brackets.

should be only
{name, age, gender}


#3

THX, but that is doesn;t matter, 'cause still do es not working… and in the exemple are many brackets :smile:

still it have problem with the “age”


#4

i don’t see a return statement…

exercise asks you to return a person object…


#5

code is correct But The solution does not require modifications outside the comments.
change your code like this:

const createPerson = (name, age, gender) => {
  "use strict";
  // change code below this line
  name, age, gender
  // change code above this line
};
console.log(createPerson("Zodiac Hasbro", 56, "male"));