So basically I want to change the text in a div using javascript. I managed to do it, but I encountered a problem: the tag in which that text was doesn't work anymore for the javascript changed text.
I tried changing .textContent to .innerHTML
<div class="nr11"><h1>11</h1></div>
let lastPosition=document.querySelector('.nr'+player.lastPosition);
lastPosition.textContent=player.lastPosition;
I expect for the text ( number 11 in my case ) to be changed with player.lastPosition while still having active for player.lastPosition.