JS menambahkan margin dengan variabel
document.getElementsByClassName('player')[0].style.marginTop = playerPosition+"px";
DevLorenzo
document.getElementsByClassName('player')[0].style.marginTop = playerPosition+"px";
var players = document.getElementsByClassName('player');
for(var i = 0; i < players.length; i++)
players[i].style.marginTop = playerPosition+"px";