how to remove the repeated value in an array and in between arrays using jQuery
<p>In my code I need to find the repeated value and give an alert using jQuery. Below is the example arrays and my requirement. Please help.</p>

<pre><code>            a1 = {1,2,3,4,5,6,4}
            a2= {9,8,7},
            a3= {a,b,c,d,e,7}
</code></pre>

<p>In the above arrays I need to get the value 4 and give alert because it is repeating in array "a1" and I need to get the value 7 because it is repeating in the arrays 'a2' and 'a3'.<br>
The first issue I fixed like as follows. Ineed to to fix the second one.</p>

<pre><code>        for (var $i = 0; $i&lt;= $last; $i++)
        {
        var hours = [];
        var minutes = [];
        var activeTime = [];    
        $.each($('.hour'+$i),function() {
       hours.push($(this).val());    
         });
       $.each($('.hour'+$i).next('select'),function(){
        minutes.push($(this).val());
       });
       for ( var i = 0; i &lt; hours.length; i++ ) {
          activeTime.push(hours[ i ]+":"+minutes[ i ]+":"+"00");
         }
         for ( var i = 0; i &lt;= hours.length; i++ ) {
          if ( hours[ i ] === "" )
           {
          $("#timeValidate"+$i).css("display", "block");
           return false;
           }
            else
             {
            $("#timeValidate"+$i).css("display", "none");
            }
            }
          for(var i=0; i&lt; activeTime.length; i++)
          {
           for(var j = 0; j&lt; activeTime.length; j++)
           {
          if( i != j)
             {
           if(activeTime[j] == activeTime[i])
              {
            $("#timeValidate"+$i).text("");
            $("#timeValidate"+$i).text("active time"+activeTime[j]+" is repeating");
             $("#timeValidate"+$i).css("display", "block");
            return false;
            }
            }
             }
            }
           }
</code></pre>
