change the position of div using javascript

JavaScript
document.getElementById('carRight').style.left="600px";
var moveX = 10
const x {
  if not == (obj==null) {
atrr.x = x.element //enter in the variable of your element inside "element"
  atrr.x = x.element + moveX }
}
Source

Also in JavaScript: