Line-Up Interview Question

What is the difference between for loop and filter function in javascript?