Looping Array object with conditions and comparison the performance with ECMA VS Vanilla JS
It looks like the main difference between your original code snippet and the two revisions is that you're using .filter() instead of .forEach() - both of which came out around the same time, and both of which came out a while ago (IE 9 supports both).
It looks like you aren't doing any significant changes to the code that would improve speed, so you will only see marginal improvements to performance, if any. But, you can always benchmark each of them and find out for yourself how fast each version is.
The original solution is actually the best one among the three shown. There seems to be a big misunderstanding about what the filter() function is and how to use it. filter() is supposed to take an array and return a new array with some values filtered out. The values that get filtered out is decided by the function passed in. For example, if you want the even numbers in a list of numbers, you could do this:
const numbers = [1, 3, 4, 6, 7, 9]
const isEven = n =&gt; n % 2 === 0
console.log(numbers.filter(isEven)) // [ 4, 6 ]

You are not using filter() this way - you're just using is like an alternative forEach() function, which is a big no-no. You can just change the .filter() for .forEach() in each of your revisions. Once you have done that, both your original code and your first revision would work just fine. I wouldn't go with the second one though, there's too much inside the if conditions.
I don't really have any newer javascript feature to suggest for these code snippets, except that I generally recommend using the newer for of loop instead of forEach() - it's more powerful than .forEach(), and it fixes the issues that for-in loops had.