title: Javascript Variable is not defined
body: <p>why does it always say <code>undefined</code> when I move the mouse? It should return true, right? I hope somebody can help me :)
  Before you ask I called the class in another JavaScript file!</p>
  
  <pre><code>class Block {
  
   constructor() {
  
      this.movable = true;
      this.move = false;
  
      this.div = document.createElement("div");
      this.div.classList.add("block");
  
      this.div.addEventListener("mousemove", function() {
  
          console.log(this.movable); 
  
      });
      this.div.addEventListener("mousedown", function() {
  
          this.move = true;
          console.log("test");
  
      });
      this.div.addEventListener("mouseup", function() {
  
          this.move = false;
          console.log("test1");
  
      });
  
   }
   add() {
  
       document.body.appendChild(this.div);
  
   }
   remove() {
  
       document.body.removeChild(this.div);
  
   }
  
  }
  </code></pre>