title: How to exit from setInterval
body: <p>I need to exit from a running interval if the conditions are correct:</p>
  
  <pre><code>var refreshId = setInterval(function() {
          var properID = CheckReload();
          if (properID &gt; 0) {
              &lt;--- exit from the loop---&gt;
          }
      }, 10000);
  </code></pre>