input: Write a python function to perform a linear search and return the index of the element.
  assert linearSearch([10, 20, 30, 40, 50], 30) == 2
  assert linearSearch([1, 2, 3, 4, 5], 5) == 4
  assert linearSearch([7, 8, 9], 6) == -1
output: def linearSearch(arr, target):
      for i in range(len(arr)):
          if arr[i] == target:
              return i
      return -1