Guest User

Untitled

a guest
Aug 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. var e = [[2,4,3,4,2],[1,5,3,6,2],[2,4,3,4,1],[1,4,3,6,1],[2,4,3,6,5]];
  2. var i; //id of entry to check
  3. var j; //id of element to check
  4. var k; //id of entry to compare
  5.  
  6. for (i in e){ //2D ARRAY ARRAY
  7. for (k in e){ //ELEMENT TO COMPARE
  8. if (e[i][2] === e[k][2] && e[i][3] === e[k][3] && e[i][0] && e[i][0] >= e[k][0] && e[i][1] <= e[k][1] && e[i][4] <= e[k][4] && i !=k){
  9. e.splice(i,1);
  10. continue;
  11. }
  12. }
  13. }
  14. return e;
Add Comment
Please, Sign In to add comment