title: Validating array sequence value except the zero 0
body: <p>I have an array validating if values are ordered by descending or not. However, if the sequence have a value of 0 it interrupt the process and returns false instead of true. How do i avoid the 0 value and continue the process as descending. <a href="https://jsfiddle.net/snb3p0qy/1/" rel="nofollow">https://jsfiddle.net/snb3p0qy/1/</a></p>
  
  <pre><code>function customValidate(array) {
      var length = array.length;
      return array.every(function(value, index) {
          var nextIndex = index + 1;
          return nextIndex &lt; length ? value &gt;= array[nextIndex] : true;
      });
  }
  document.write(customValidate([1, 2, 3, 4, 5]));
  document.write(customValidate([5, 0, 3, 2, 1]));//This supposed to be true
  document.write(customValidate([0, 0, 0, 4, 5]));
  document.write(customValidate([0, 0, 0, 2, 1]));
  </code></pre>