text: Q:
  
  Remove duplicate cordinates from an array
  
  My array contains:-
  (18.9992561589571, 72.83004879020154),(19.124614516591855, 72.87498710677028)
  
  value, But for removing duplicate value i called 'removeDuplicates' function. But some times(In other cordinates it's works fine, But some time it's fails), So i dont know what's wrong with in it. Please help me.
  Here is removeDuplicates function:-
  function removeDuplicates(arr) {
      var n, y, x, i, r;
      r = [];
      o: for (i = 0, n = arr.length; i < n; i++) {
          for (x = 0, y = r.length; x < y; x++) {
              if (r[x][0] == arr[i][0] && r[x][1] == arr[i][1]) {
                  continue o;
              }
          }
          r.push(arr[i]);
      }
      return r;
  }
  
  Input:-
  array:-   (18.9992561589571, 72.83004879020154),(19.124614516591855, 72.87498710677028)
  
  Expected Output:-
  array:-   (18.9992561589571, 72.83004879020154),(19.124614516591855, 72.87498710677028)
  
  Getting:-
  array:-   (18.9992561589571, 72.83004879020154) 
  
  A:
  
  For the sake of completeness, here's how I'd implement it:
  var arr = [[18.9992561589571, 72.83004879020154],
             [19.124614516591855, 72.87498710677028],
             [18.9992561589571, 72.83004879020154]];
  
  function getUniqueTuples(tuples) {
      var a = [], h = {};
      tuples.forEach(function(t) {
          var k = t[0] + '|' + t[1];
          if (!(k in h)) {
              h[k] = null;
              a.push(t);
          }
      });
      return a;
  }
  
  arr = getUniqueTuples(arr);
  console.log(arr);
  
  Demo. The point is replacing array look-up with hash look-up for duplicates - the bigger your array of tuples is, the better will be the speed.
  
  Now let's check your code:
  var a=[];
  a.push("(18.9992561589571, 72.83004879020154)");
  a.push("(19.124614516591855, 72.87498710677028)");
  alert(removeDuplicates(a));
  
  Here's the problem: removeDuplicates actually is set up to deal with array of arrays (which, in turn, should consist of two elements). Yet your original array consists of strings, not arrays. 
  Therefore, [0] and [1] properties, when compared, are actually 0th and 1st characters of those strings - '(' and '1' in both cases, respectively. In other words, your coordinates are considered to be equal if the very first digit in them is the same.
  Solution? Either work with arrays from the start, or make arrays from your strings - the easiest way to do it would be using regex, I suppose:
  var patt = /[\d.]+/g;
  var firstCoord = "(18.9992561589571, 72.83004879020154)";
  var secondCoord = "(19.124614516591855, 72.87498710677028)"; 
  a.push(firstCoord.match(patt), secondCoord.match(patt));
  
  