let picture = document.getElementById('image1');
function moveLeftArrow () {
picture.style.left = parseInt(picture.style.left) - 5 + 'px';
}
This code is designed to allow users to move images using the arrow keys. Interestingly, the function works as expected when the variable picture
is declared locally, but encounters issues when declared globally. Why might this be the case?