Javascript function

在 ninja 裡面看到匿名函式的特殊用法,已經沒看過
var ninja = function myNinja(){
assert( ninja == myNinja, “This function is named two things – at once!” );
};

This brings up the most important point: Anonymous functions can be named but those names are only visible
within the functions themselves
匿名函式可以被取名字…=_=??!! 但是他只能在匿名函式內被看到與在他匿名函式內呼叫…超酷的欸
ninja();

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *