<!DOCTYPE html>
<html lang="en">
<head>
<title>Animation Using Coordinates</title>
</head>
<body>
<div id="animateMe" style="width: 50px; height: 50px; background: blue; position: absolute;"></div>
<script>
const target = document.getElementById('animateMe');
let pos = 0;
setInterval(function() {
if (pos == 350) {
pos = 0;
}
pos += 1;
target.style.left = pos + 'px';
}, 10);
</script>
</body>
</html>