Write a function named index_of
that returns the index of a
particular value in an array of integers. The function should return the
index of the first occurrence of the target value in the array. If the value
is not in the array, it should return -1.
For example, if an array called $arr
stores the following values:
$arr = [42, 7, -9, 14, 8, 39, 42, 8, 19, 0];
Then the call index_of($arr, 8)
should return 4 because the index of
the first occurrence of value 8 in the array is at index 4. The call
index_of($arr, 2)
should return -1 because value 2 is not in the array.