Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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]];
- var i; //id of entry to check
- var j; //id of element to check
- var k; //id of entry to compare
- for (i in e){ //2D ARRAY ARRAY
- for (k in e){ //ELEMENT TO COMPARE
- 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){
- e.splice(i,1);
- continue;
- }
- }
- }
- return e;
Add Comment
Please, Sign In to add comment