...一个函数一般有如下三种方式: 函数关键字(function)语句: function fnMethodName(x){alert(x);} 函数字面量(Function Literals):
基于52个网页-相关网页
Function literals & inline functions 函数字面量和内联函数
Function literals are "anonymous" functions.
字面函数也就是“匿名”函数。
Closures are function literals - expressions that embody a deferred computation that can be treated as a value and invoked later.
闭包是函数字面量(unction literal)——是包含了一个递延计算的表达式,该计算可被当成值对待,在晚些时候再调用。
You can also use this short-hand syntax in some more complex function literals, as we will see in Chapter 3, Rounding Out the Essentials.
你可以在一些更复杂的字面函数中使用这种简化的语法,就像我们将在《第3章 - 要点详解》中看到的那样。
应用推荐