In JavaScript I can use the style.left property to move a div around, but when I use style.right it doesn't work

I know you have to invert the properties and I've done that. I also replaced the style.right.replace function with style.left.replace and changed the other parts to move the left property ${left + 1} and it worked! This confirms there is no typo. style.right just doesn't work at all for me. Any thoughts on this code?

//This Works!  
var dodger = document.getElementById('dodger')

function moveDodgerLeft() {
 var leftNumbers = dodger.style.left.replace('px', " ")
 var left = parseInt(leftNumbers, 10)

    if (left > 0) {
      dodger.style.left = `${left - 1}px`
    }   
}

document.addEventListener('keydown', function(e) {
  if (e.which === 37) {
    moveDodgerLeft()
  }
})


// This doesn't work
function moveDodgerRight() {
  var rightNumbers = dodger.style.right.replace('px', " ")
  var right = parseInt(rightNumbers, 10)

  if (right > 0) {
  dodger.style.right =`${right - 1}px`
  }
}

document.addEventListener('keydown', function(e) {
  if (e.which === 39) {
    moveDodgerRight()
  }
})