title: ReferenceError: Can't find variable: sumArray
body: <p>I keep getting an error message in my web page console when testing out this loop; "ReferenceError: Can't find variable: sumArray".</p>
  
  <p>My first loop worked just fine and resulted in a "true" message.</p>
  
  <pre><code>//*** isUniform() ***
  
  function isUniform(arr){
      var first = arr[0];
      for(var i = 1; i &lt; arr.length; i++){
        if(arr[i] !== first){
          return false;
        } 
      }
      return true;
  }
  </code></pre>
  
  <p>But my second loop worked just fine and resulted in a "ReferenceError: Can't find variable: sumArray" message.</p>
  
  <pre><code>// *** sumArray() ***
  
  function sumArray(arr){
      var total = 0;
      arr.forEach(function(element){
        total += element; 
      });
      return total;
  }
  </code></pre>