At the moment you are calling your function, but just throwing the result away. You don't actually give a value from your function call (you use return
just fine):
You want something like:
position = binarySearch(names, "Ava Fischer")
The variable that you are expecting to exist globally is local to the scope of binarySearch
. We can get it by assigning a variable to the returned value, like above.