Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1.  
  2. // use map, but, this is how to do it without map
  3.  
  4. var result = [];
  5.  
  6. for (var r=0, rCount = totalRows.length; r<rCount; ++r) {
  7. var thisRowIsExcluded = false;
  8. for (var c=0, cCount = totalColumns.length; c<cCount; ++c) {
  9. var filterCriterion = totalColumns.getYourInputThingSomehowHere;
  10. if (yourFilterFailsOn(totalRows[r].whicheverColumn, filterCriterion)) {
  11. thisRowIsExcluded = true;
  12. }
  13. }
  14. if (!(thisRowIsExcluded)) {
  15. result.push(totalRows[r]);
  16. }
  17. }
  18.  
  19. doReactShitWith(result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement