I have a 2d array like this:
var arr = [[2,3],[5,8],[1,1],[0,9],[5,7]];
Each index stores an inner array containing the coordinates of some
you can use this method,
function isArrayItemExists(array , item) { for ( var i = 0; i < array.length; i++ ) { if(JSON.stringify(array[i]) == JSON.stringify(item)){ return true; } } return false; }