Stuck - Javascript - Record Collection

Hi there guys!

I’ve been stuck on the Record Collection Challenge in Javascript Basics for almost a week. I made a flowchart and reasoned that deleting any prop that has been entered with a blank value should be the first decision made by the function. However, I can’t get it to run. The first step! It’s mildly infuriating and I’ve tried chewing on it a bit but the time has come to ask for some help. Here is my code:

function updateRecords(records, id, prop, value) {
  if (value == "") {
    delete records.id.prop
  }
  return records
}

Any advice on this current situation and little hints on the problem as a whole would be greatly appreciated. I also wanna say thank you for all your help so far! I don’t really have a lot of people I talk to regularly that know anything about programming and you guys have helped a lot :slight_smile:

You may want to revisit the Accessing Object Properties with Variables challenge.

2 Likes