Skip to content

Instantly share code, notes, and snippets.

@basekays
Created October 20, 2016 02:45
Show Gist options
  • Select an option

  • Save basekays/b01e8e76b9a81a7b826d921b6b6475a2 to your computer and use it in GitHub Desktop.

Select an option

Save basekays/b01e8e76b9a81a7b826d921b6b6475a2 to your computer and use it in GitHub Desktop.
var _ = {};
_.reject = function(list, condition) {
var resultArray = [];
for (var i = 0; i<list.length; i++) {
if (!condition(list[i])) {
resultArray.push(list[i]);
}
}
return resultArray;
};
@amy-chiu

Copy link
Copy Markdown

looks good also :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment