code: function isUnique(array) {
   var u = {}, a = [];
   var isUnique = 1;
   for(var i = 0, l = array.length; i < l; ++i){
      if(u.hasOwnProperty(array[i])) {
        isUnique = 0;
        break;
      }
      u[array[i]] = 1;
   }
   return isUnique;
  }
docs: Function to check if array is unique (i.e. all unique elements, i.e. no duplicate elements)