How can I adjust the margin-top property of the ball element when clicking a button? Below is my current code, but it's not working as expected. Can you help?
let ballMargin = ball.style.marginTop;
moveButton.addEventListener('click', function moveDown() {
for (let i = 0; i < ballMargin.length; i++) {
ballMargin[i] += '10px';
}
});