input: Write a python function to find the largest element in an array.
  assert findLargestElement([1, 2, 3, 4, 5]) == 5
  assert findLargestElement([-10, -20, -30, -40, -5]) == -5
  assert findLargestElement([5, 3, 8, 2, 10]) == 10
output: def findLargestElement(arr):
      if not arr:
          return None
      largest = arr[0]
      for num in arr:
          if num > largest:
              largest = num
      return largest