「this」がクラス関数/メソッド内で使用された場合と、匿名関数内で使用された場合とで動作が異なるのはなぜですか。
例えば
public MyClass
{
function myfun()
{
output(this) // << will show the instance of this class but not myfun() function
abc = function ()
{
output ( this ) // << will show abc function
}
abc()
}
}
では、なぜ「this」は MyClass のインスタンスを出力するのに myfun() を出力しないのでしょうか。匿名関数との違いは何ですか?