JS: "Manipulating Complex Objects": missing comma in line 12
See original GitHub issueChallenge Manipulating Complex Objects has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
The code as appears below (my final answer) works; but the FCC user must add the comma above the “//Add record here” line: this is misleading since usually FCC problems direct the user to just change certain parts of the code; however, here the user must add a comma to the FCC code outside the part the user is directed to change (which leads to wasted time and fruitless head-scratching).
My code:
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CS",
"8T",
"LP" ],
"gold": true
},
// Add record here
{
artist: "U2",
title: "October Sky",
release_year: 1982,
formats: [
"LP",
"Cassette"
]
}
];
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
JS: "Manipulating Complex Objects": missing comma in line ...
A user can add a comma after the // Add record here line, but it will raise a pair of comma warnings in...
Read more >Bug in "Manipulating Complex Objects"? (Help me understand)
I was stuck on this as well. The comma between the strings is what messed me up. Thanks for the clarification!
Read more >JSON.stringify not adding commas between contained objects
Example code follows... ...which obviously isn't valid JSON because there's no comma between the objects within the containing bCache object. (I ...
Read more >Manipulating Complex Objects - Basic JavaScript - YouTube
In todays tutorial we manipulate a complex JSON object. We write in a new album to the album book. This is great practice....
Read more >Working with objects - JavaScript - MDN Web Docs - Mozilla
You can add a property to all objects created through a certain constructor using the prototype property. This defines a property that is...
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
Content hidden by moderator
@BKinahan I don’t think its necessary to clarify more than the instructions already have. True that at many places we have mentioned in the to edit code only in certain areas of the seed code like
// only change the code below this line
but that doesn’t mean campers get very comfortable and start not reading what the instructions or the comments say. This is a good case to break that zone, IMHO.
Because at the end of the say as a camper I am not just typing in code but I am learning, and paying attention to details is one quality to be learned.
@Ailokin thanks for reporting, but I feel that any further clarification for the placement of comma would be spoon feeding.