SyntaxFix
Write A Post
Hire A Developer
Questions
Since ES6 filter supports pointy arrow notation (like LINQ):
filter
So it can be boiled down to following one-liner.
['a','b',1].filter(item => typeof item ==='string');