title: How do I remove an already drawn image from HTML5 Canvas (just that one not other ones)
body: <p>So, I have to make this project for school and I need to be able to remove one image specifically because when I do clearRect() it removes all images.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;Game&lt;/title&gt;
      &lt;style type="text/css"&gt;
      * { margin:0; padding:0; } /* to remove the top and left whitespace */
  
      html, body { width:100%; height:100%; } /* just to be sure these are full screen*/
  
      canvas { display:block; } /* To remove the scrollbars */
  
      #gC {
          position: relative;
          left: 16vw;
          top: 9vh;
          margin: 0;
          padding: 0;
      }
  
      body {
          background-image: url('bg.jpeg') !important;
          overflow: hidden !important;
      }
      &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt; &lt;canvas id="gC" width="1500" height="1000"&gt;&lt;/canvas&gt;
      &lt;script type="text/javascript"&gt;
      var canvas = document.querySelector("#gC");
      var ctx = canvas.getContext("2d");
      var team1 = new Image();
      var bT = new Image();
      var t1_x = 150;
      var t1_y = 100;
      var bT_x = 50;
      var bT_y = 350;
      var AI_I = 0;
      team1.src = "team1.png";
      bT.src = "bT.png";
  
      function team1AI() {
          ctx.clearRect(0, 0, canvas.height, canvas.width);
          ctx.drawImage(bT, bT_x, bT_y);
          ctx.drawImage(team1, t1_x, t1_y);
          t1_x++;
      }
      var t1AI = setInterval(team1AI,10);
  
      function t1AI_inter(){
          if(AI_I &gt;= 90){
              clearInterval(t1AI);
          }
  
          AI_I++;
  
      }
  
      function leftArrowPressed(){
          ctx.clearRect(0, 0, canvas.height, canvas.width);
          ctx.drawImage(bT, bT_x, bT_y);
          bT_x-=5;
      }
  
      function moveSelection(evt) {
          switch (evt.keyCode) {
              case 37:
                  leftArrowPressed();
                  break;
              case 39:
                  rightArrowPressed();
                  break;
              case 38:
                  upArrowPressed();
                  break;
              case 40:
                  downArrowPressed();
                  break;
  /*
              case 32:
                  spaceKeyPress();
                  break;
  */
          }
      }
  
      setInterval(t1AI_inter,10);
  
      window.addEventListener('keydown', moveSelection);
  
      &lt;/script&gt;
  </code></pre>