filter() works in almost all browsers in common use and uses compiled processing built into the browser making it a lot faster as well as a lot shorter.
That you have to add a half dozen lines of extra code for the few browsers that don't yet support it that will add one extra comparison to what needs to run in the browsers that do makes your code easier to maintain than using a different way of coding. Once all browsers in use do support it you simply delete those extra lines of code.
Using an alternative approach just because one commonly used browser doesn't support it means that once that browser dies out you still have your far longer harder to maintain code waiting to be rewritten into something that is both a lot shorter and a lot faster.
If you want shorter easier to maintain code you'd use filter. That is is faster as well is a bonus.
welcome to the future, may it serve you well!
Originally Posted by felgall
Note that filter is also much shorter to code and test in the first place as you have only one line of code that you have written that needs testing as compared to the alternative where you have to write a lot more code including a loop.
Why code and test an entire loop of code that needs to do the same thing as can already be easily done with only one line of new code.