Forum Discussion
tstack
9 years agoFormer Employee
The expression language is a subset of JavaScript, so you can usually start by looking for JavaScript-based solutions.
In this case, take a look at this post:
The first answer has the simplest solution. The only change you have to make is to convert the callback function to use the arrow-function syntax, like so:
$arr.filter((item, pos, a) => a.indexOf(item) == pos)
Anjali
5 years agoNew Contributor
Can you please explain how this filter function is working? what is item , pos and a here and how there are functioning?