我知道
javascript,例如支持函数内部的函数,如下所示:
- function doSomething(){
- function doAnothingThing(){
- //this function is redefined every time doSomething() is called and only exists inside doSomething()
- }
- //you can also stick it inside of conditions
- if(yes){
- function doSomethingElse(){
- //this function only exists if yes is true
- }
- }
- }
- -(void) doSomething:(id) sender{
- -(void) respondToEvent: (id) sender{
- //theoretically? ... please?
- }
- }
奖励:“本地”功能的正确用语是什么?