js underscore filter code example
Example 1: underscore throttle
var throttled = _.throttle(updatePosition, 100);
$(window).scroll(throttled);
Example 2: Underscore.js
var evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
=> [2, 4, 6]