Implement the filter Method on a Prototype Explanation

Tell us what’s happening:
Using the solution from the hint in the challenge, I know my code works and I was able to pass. But, I am confused as to the solution itself. Can someone please explain this code to me? I want to recreate my own code for this challenge before moving on.

The specific line of code that I am stuck on utilizes the callback function in the if statement.
if (callback(x) == true) I believe if I can clarify this line I will be able to understand the remaining lines of code I am struggling with.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype

I have edited the post to ensure the solution code is removed and highlighted one specific line where I am stuck. Thanks so much for the advice, I will make sure not to repeat the same mistakes!

in the filter method the callback returns a boolean (true or false) and keeps the value if it is true, and doesn’t keep the value if it is false

that if statement is checking if the value returned from the callback is true and if it doing something