input: Write a python function to rotate an array to the right by one position.
  assert rotateArrayRight([1, 2, 3, 4, 5]) == [5, 1, 2, 3, 4]
  assert rotateArrayRight([10, 20, 30, 40]) == [40, 10, 20, 30]
  assert rotateArrayRight([7, 8, 9]) == [9, 7, 8]
output: def rotateArrayRight(arr):
      if len(arr) == 0:
          return arr
      return [arr[-1]] + arr[:-1]