I was wondering how I\'d go about implementing a method in javascript that removes all elements of an array that clear a certain condition. (Preferably without using jQuery)
You can use lodash.remove
var array = [1, 2, 3, 4]; var evens = _.remove(array, function(n) { return n % 2 == 0; }); console.log(array); // => [1, 3] console.log(evens); // => [2, 4]