input: Write a function to perform a linear search on an array.
  assert linearSearch([1, 2, 3, 4, 5], 4) == 3
  assert linearSearch([10, 20, 30, 40, 50], 30) == 2
  assert linearSearch([7, 14, 21, 28], 14) == 1
  assert linearSearch([5, 10, 15, 20], 25) == -1
output: def linearSearch(arr, target):
      for i in range(len(arr)):
          if arr[i] == target:
              return i
      return -1