Placing the variable "Mid"

In the code under the statement
" if(arr[mid]==data) "
I did
high = mid - 1;
and then data = mid ;
instead of what was given in the video { that was in reverse order } But I got the same result.
Am I missing any testcase if I go with my approach.

no writing the statements in this order will give the same result only

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.