var r = document.getElementById("r"); r.innerHTML = _.filter([1, 2, 4], function(num) { return num % 2 === 0; }); // => [2, 4]