var arr = [\'test0\',\'test2\',\'test0\'];
Like the above,there are two identical entries with value \"test0\",how to check it most efficiently?
If you sort the array, the duplicates are next to each other so that they are easy to find:
arr.sort(); var last = arr[0]; for (var i=1; i