title: How to kill the timer js
body: <p>I want my ajax call runed no often that 200 ms, so I wrote</p>
  
  <pre><code>if (update_timer != null) {
      // do nothing
  } else {
      // update_timer == null
      update_timer = setTimeout (function () {perform_ajax_refresh()}, 200);
  }
  </code></pre>
  
  <p>And in perform_ajax_refresh() function did:</p>
  
  <pre><code>function perform_ajax_refresh()
  {
      clearTimeout(update_timer); 
      console.log(update_timer);
           // do ajax here
  }
  </code></pre>
  
  <p>These 2 lines are my effort to kill the update_timer variable. What is the right way to do it??? I guess that clearTimeout makes no sence, but this is my effor to set <code>update_timer</code> variable to null. </p>