With how you have this function coded now it is not very reusable. It set up to only work if recordCollection is there. Try fixing the references to that object.
Do you understand all the arguments being passed to the function and how to use them inside the function? There is an object being passed in the function call that you should be using.
records is an object made up of a bunch of individual record objects. Currently, your code directly uses the recordCollection variable, but what if you had rockRecordCollection or popRecordCollection? The function is supposed to accept different sets of records as the `rrecords parameter
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.