JSFiddle - React, Tailwind, and code Playground

HTML

<body>
  <p>
  <span>Move the mouse over the div.</span>
</p>
<div><button id="doCrime">
    Utfør
  </button></div>

CSS

div { width:420px; height:570px; margin: 10px 50px 10px 10px;
      background:yellow; border:2px groove; float:right; }
p { margin:0; margin-left:10px; color:red; width:220px;
    height:120px; padding-top:70px;
    float:left; font-size:14px; }
span { display:block; }

JavaScript

let movement = [];
function doCrime() {
	console.log("test");
}

document.getElementById('doCrime').click(doCrime());

document.onmousemove = function(e){
	
  const cords = {
  	x : e.pageX,
    y : e.pageY
  };
  
  movement.push(cords);
};