Skip to content

Instantly share code, notes, and snippets.

@sdqali
Created May 21, 2012 16:30
Show Gist options
  • Save sdqali/2763149 to your computer and use it in GitHub Desktop.
Save sdqali/2763149 to your computer and use it in GitHub Desktop.
arr.filter(function(a){
return a % 2 == 0;
})
.reduce(function(a, b) {
return a + b;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment