title: For Loop running infinitely
body: <p>So Ive been fighting  with this for loop for a day and a half now, when I get it to actually print it goes infinitely,  even when the if statement (logCount === 10) is satisfied... 
  Not too sure what to try anymore, really feel like its far simpler than what I'm trying....     </p>
  
  <p>Any attempts at a solution are appreciated..        </p>
  
  <pre><code>var timers = [];
  
  var log = (function(outputFunc) {
  
    var counter = 0;
    var callerLog = [];
    var dateTime = [];
  
    //assigning current Date to a variable to print for logs
    let logDate = new Date();
    return function(timer) {
      for (var logCount = 0; logCount &lt;= 10; logCount++) {
        //printing data without using printFunc, as specified
        document.getElementById("output").innerHTML += logCount + " " + timer + " " + logDate + "&lt;br&gt;";
  
        //TODO: add after for loop is resolved.
        if (logCount &gt;= 10) {
          clearInterval(timer1);
          clearInterval(timer2);
          clearInterval(timer3);
          document.getElementById("output").innerHTML += "&lt;br&gt;&lt;br/&gt; Logging stopped.";
        }
      }
    }
  })(printFunc);
  
  function printFunc(output) {
    document.write(output + "&lt;br&gt;");
  }
  
  function startMeUp() {
    // add each of the timer references to the timers array
    // as part of invoking the log function following each interval
    timers.push(setInterval("log('Timer1')", 1000));
    timers.push(setInterval("log('Timer2')", 1200));
    timers.push(setInterval("log('Timer3')", 1700));
  }
  </code></pre>