I'm a little confused about coroutines

Hi,

I’m a little confused about coroutines.
See the code below.

IEnumerator f()
{
    yield return StartCoroutine(g());
   
    if (one == true)
    {
        Do something ....
    }
}

IEnumerator g()
{
    if (two == true)
    {
        Do something ....
    }
    if (three == true)
    {
        Do something ....
    }
   
    yield return null;
}

Is it right that if-statement “two” is executed first, then if-statement “three” and then if-statement “one”?
Are the if-statements “two” and “three” both finished before “yield return null” goes back to IEnumerator f()?

if you start coroutine with ‘f()’, then the first thing that happens is we start coroutine g() and wait for it to complete

while g is running, ‘two’ and ‘three’ are processed, THEN we yield null and wait one frame

now g is complete so we return to f, and we run ‘one’

Ok thanks.
So it’s for sure that “three” is finished before we return to f and run “one”?

yes

Thanks!
It’s all clear now.