title: Why do I get "setTimeout is not a function" here?
body: <p>I am making a simple memory game. I used some setTimeout. Until a point, It was going good. After that I wanted to add a stopwatch. And bom. I got this error.</p>
  <blockquote>
  <p><code>Uncaught TypeError: Property 'setTimeout' of object [object Object] is not a function</code></p>
  </blockquote>
  <p>At this line:</p>
  <pre><code>function counter(){
  
  ctxCounter.font=&quot;100pt Arial&quot;;
  var fillT= setTimeout( function(){ctxCounter.fillText(&quot;3&quot;,270,340);} , 100);
  var clearT= setTimeout( function(){counterClear();} , 1000);  
  }
  </code></pre>
  <p>and my stopWatch part's code. After adding this line I get the error written above. But without stopwatch everything works perfectly.</p>
  <pre><code>var timer=0;
  var running=false;
      
  
      function startPause(){
          if(running==false){
              running=true;
              increment();
          }
          else running=false;             
      }
  
      function reset(){
          timer=0;
          running=false;
      }
  
  
      function increment(){
          if(running==true){
              
              window.setTimeout=(
  
                  function(){
                  var mins= Math.floor(timer/600);
                  var secs= Math.floor(timer/10);
                  var tenths= timer%1000;
                  var all= mins+&quot;:&quot;+secs+&quot;:&quot;+tenths;
                  console.log(all);
                  increment();
                  },100);
          }
  
      }
  </code></pre>
  <p>I've stuck here for two days. Please, helm me.</p>