title: Why am I getting an empty alert box?
body: <p>I have js function onsubmit forms</p>
  
  <pre><code>var bCancel = false;
  var errors = new Array();
  function validateNewsForm(form) {
      if (bCancel) {
          return true;
      } else {        
          errors = [];        
          var statusArray = new Array();
          statusArray.push(validateRequired(form));
          statusArray.push(validateMaxLength(form));
          statusArray.push(validateDate(form));
  
          for (status in statusArray) {
              if (!status) {              
                  alert(errors.join('\n'));               
                  return false;
              }
          }
  
          return true;
      }
  }
  </code></pre>
  
  <p>validateSmth() functions work fine. But when I input correct data I can't save because get empty alert. I have just one alert message and now that all validate functions gives true( in case correct data)</p>
  
  <p>Why can I get empty alert?</p>