title: Array value validation error for checking existing data
body: <p>Array value validation error the option else statement is not working 
  I need to check whether the value are existing or not in array using jquery</p>
  
  <pre><code>   $(document).ready(function (){
     $('.txtbox').focusout(function () {
      var bind = [10];
      var data = $(this).val();
  
              for (var j = 0; j &lt; 10; j++) {
                  if (bind[j] == data) {
                      alert("This Name Is Already Exist");
                      $(this).val("");
                      $(this).focus();                        
                  }
                  else {
                      bind[j] = data;
                  }
              }
        });
       });
  </code></pre>
  
  <p>Html Code:</p>
  
  <pre><code> &lt;input type="text" class = "txtbox" id="0"/&gt;
   &lt;input type="text" class = "txtbox" id="1"/&gt;
   &lt;input type="text" class = "txtbox" id="2"/&gt;
  </code></pre>