Problem With Functions and Yield

function somefunction(){
    yield;
    print("test");
}
somefunction();//---> test

var someotherfunction = function(){
    yield;
    print("other test");
};
someotherfunction();//---> Nothing

var somethirdfunction = function(){
    //yield;
    print("third test");
};
somethirdfunction();//---> third test

Does anyone have an idea as to why yield doesn't work in functions which are assigned to a variable? And how to possibly get it to work correctly?

Thanks

You'd have to call StartCoroutine on them manually.

The issue is that javascript hides the implementation here, calling StartCoroutine implicitly on yielding functions which are called when not assigning them to anything.

var someotherfunction = function(){ yield; print("other test"); };
StartCoroutine(someotherfunction());