Intermediate Algorithm Scripting: Wherefore art thou: Help

Intermediate Algorithm Scripting: Wherefore art thou: Help
0.0 0

#1

Although I pass few tests But I don’t really understand what this challenge exactly wants me to do. It’s been two days since i’m stuck at this challenge. Can anybody explain this to me.

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/wherefore-art-thou/


#2

Hello again, it would probably be easier to help you if you tried to explain your understanding first (so we can identify if you have the correct or flawed understanding of the problem easier). But in general, the problem is a search problem for key-value pairs.
If you review the example, they give you a specific key-value pair and ask you to find it and return the data structure it is in. (An object in this case that contains the same ke-vakue pair)

Similar to what we did in the records problem if you recall but with objects this time. So just search the given array of objects for the specified key-value pair and return the object you found them in.


#3

I pass the test.
what i understand is that the challenge wants you to return an array of objects.
But only those object whose first and last values are matched with the 2nd argument.
if there are no matches then return an empty array.


#4

yes I see you are correct about that (an array of objects is being returned)