title: how do i move a rectangle down in my javascript game
body: <p>Im new to javaScript game development and I need to move a rectangle i created down for a simple movement in the game im making</p>
  <pre><code>player.downMovement = function() {
              let downBtn = document.getElementById('moveDown')
              downBtn.addEventListener('click', function movePlayerDown(){
                  let playerY = player.y - 20
                  function clearPlayer() {
                      ctx.clearRect(100, playerY + 20, 20, 20)
                  }
                  player.y = player.y + player.height;
                  setTimeout(clearPlayer, 10)
              
              })  
              player.draw();
          }
  </code></pre>