Everything you need to know about the filter method in JavaScript