So you did not understand.
if is not a replacement for recursion,
if is a tool for recursion.
while is a replacement.
Lets say we want to count from an arbitrary
x backwards to
0, then we do this:
return if x < 0
backwards(x - 1)
Understanding recursion is important, as it will make it a lot easier to deal with recursive data later on that is not flat (trees and graphs come to my mind).
Also it is important that you understand why your original code stuck in infinitely calling
myF once you enter a value out of the valid range. I explained already above. Without understanding the issue, I might assume that there will be scoping issue you stumble over later on.