I have to filter out certain elements from an array in javascript and thought of using underscore.js for this purpose. As I am new to it,some help is appreciated.Please refer the code below , I have to find A \ B and assign the result to C . Does underscore.js has any convinience method to do that ?
function testUnderScore(){
alert("underscore test");
var a = [84, 99, 91, 65, 87, 55, 72, 68, 95, 42];
var b = [ 87, 55, 72,42 ,13];
var c = [];
alert(c);
}
By using
differencemethod:http://documentcloud.github.com/underscore/#difference