I am having two arrays, how can i compare the two arrays at single shot.
var arr1= [\"a\",\"b\",\"c\"]; var arr2 = [\"a\",\"c\",\"d\"] if(arr1 == a
I would make use of underscore for this.
var same = (_.difference(arr1, arr2).length == 0)