// This method return an object including all css properties of an object
// Code below moves an element with id = element to the right
// on every button click, assuming a position relative for element.
const button = document.querySelector("button");
const targetElement = document.getElementById("element");
button.addEventListener("click", moveRight);
function moveRight() {
const { left } = getComputedStyle(targetElement);
targetElement.style.left = parseInt(left) + 10 + "px";
}