In my array, I have the following values:
var a = [2,3,4,5,5,4]
I am looking to extract only unique values from this array, like so:
b = [2,3,4,5]
I have attempted to achieve this using
a.filter(function(d){return b.indexOf(d)>-1})
without resorting to a for loop.