How JavaScript array filtering works, when to use filter, how it differs from map, and how to keep conditions readable with examples.