question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JS: "Manipulating Complex Objects": missing comma in line 12

See original GitHub issue

Challenge 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:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
seunzonecommented, Feb 28, 2017

Content hidden by moderator

1reaction
raisedadeadcommented, Jul 23, 2016

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found