I am trying to implement a callback/delegate in JS. However, I can’t figure out the type of the variable.
var callback;
function Start()
{
callback = FooBar;
callback();
}
function FooBar()
{
Debug.Log("FooBar");
}
This works, as expected. However, if I wish to specify a type for the callback variable, what should it be? Will this also works with strict mode enabled?[/code]