Bug on "Record Collection" page in 'Advanced Algorithm Challenges'

Bug on "Record Collection" page in 'Advanced Algorithm Challenges'
0

#1

Hi all! I tried to attempt the “Record Collection” challenge today but I found that no matter what I put in the code editor, my console would output the same thing. https://www.freecodecamp.org/challenges/record-collection For example, when I would try to just return the ‘prop’ variable for debugging purposes, I would get the collection object - I tried to change the variables when calling the function as well and the same exact collection object would pop up.


thanks!


#2

Can you post your actual code instead of the screenshot? It would make it easier to check some things out.

To enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#3

Don’t worry about what that black console section shows. It is not the real console. If you want to debug the function, then you will need to put console.log statements in your code and view your browser’s console (Ctrl+Shft+J in Chrome). So for example, if you want to return prop in the function and see prop’s value before it is returned in the browser’s console, you could write:

// Only change code below this line
function updateRecords(id, prop, value) {
  console.log(prop)
  return prop;
}

// Alter values below to test your code
updateRecords(5439, "artist", "ABBA");

You will notice there are multiple values printed, because there are multiple FCC tests which run consecutively.