var numbers = [1, 2, 3, 4, 5]; var filtered = numbers.filter(function(x) { return x > 3; }); // As a JavaScript 1.8 expression closure filtered = numbers.filter(function(x) x > 3);