Tell us what’s happening:
One of the tests is
the output is {name: "Zodiac Hasbro", age: 56, gender: "male"}.
My solution below also matches the one given on the hint page - https://guide.freecodecamp.org/certifications/javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields/
Both of these don’t result in the above output. But the grader still passes the test.
The output is only -
[object Object]
-
Can anyone please clarify if this is an issue or not?
-
If it is, how and where do I report this?
Your code so far
const createPerson = (name, age, gender) => {
"use strict";
// change code below this line
return {
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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 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/