Coroutines & Yield script reference

In the Coroutines & Yield script reference, there is code snippet:

public class example : MonoBehaviour {
    IEnumerator Do() {
        print("Do now");
        yield return new WaitForSeconds(2);
        print("Do 2 seconds later");
    }
    void Example() {
        Do();
        print("This is printed immediately");
    }
}

When I ran this example, the body of Do() didn’t execute. Tracing in the debugger showed that execution seemed
to jump to the opening brace of Do(), then immediately returned back to where execution left off in the calling code. Calling StartCoroutine(Do()) worked as expected. Is this an error in the documentation?

The example is in JavaScript, which does not require StartCoroutine.

The docs team are slowly switching everything over to C#. However they won’t do this for archived versions of the docs (note the 400 in the link address. This indicates you are looking at documentation for unity 4).

Here is the current link.