Incorrect commenting for "Write Concise Object Literal Declarations Using Object Property Shorthand" challenge.
See original GitHub issueAffected page
Your code
const createPerson = (name, age, gender) => ({
// Only change code below this line
name,
age,
gender
});
// Only change code above this line
Expected behavior
const createPerson = (name, age, gender) => {
return {
name: name,
age: age,
gender: gender
};
};
This solution requires the first and second lines to be edited, however, the comments ask not to do this.
The comments should accurately reflect the solution, or not exist at all.
Screenshots
System
- Device: Laptop
- OS: macOS Big Sur
- Browser: Edge
- Version: 98.0.1108.56
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
freeCodeCamp Challenge Guide: Write Concise Object Literal ...
Here, we are tasked at returning an object that accepts the function's parameters as its attributes. Hints. Hint 1. Get rid of the...
Read more >ES6 - Write Concise Object Literal Declarations ... - YouTube
In this JavaScript ES6 tutorial we write concise object literal declarations using object property shorthand.
Read more >Write Concise Object Literal Declarations Using ... - YouTube
Certification: JavaScript Algorithms and Data Structures Course: ES6 Lesson: Write Concise Object Literal Declarations Using Object Property ...
Read more >Learn ES6 (18/31) | Write Concise Object Literal Declarations ...
Learn ES6 (18/31) | Write Concise Object Literal Declarations Using Object Property Shorthand | freeCodeCamp.
Read more >How to use Object Property Shorthand in JavaScript (ES6)
By watching this video, you will learn how to write concise object literal declarations in JavaScript by using object property shorthand.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is covered in an earlier lesson: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions
So, I suggest not adding any note about implicitly returned objects.
Personally, I see no problem with this challenge, because it has given you the information you need, and has given you the specifications you need to follow in order to pass.
Specifically, part of the challenge is to accomplish the “task” only within the marked region. If a Camper is struggling to think of how to do this, then they are encouraged to open a topic on the forum.
I’d be fine with that, personally