...一个函数一般有如下三种方式: 函数关键字(function)语句: function fnMethodName(x){alert(x);} 函数字面量(Function Literals):
基于52个网页-相关网页
Function literals & inline functions 函数字面量和内联函数
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章 - 要点详解》中看到的那样。
Function literals are "anonymous" functions.
字面函数也就是“匿名”函数。
Function literals and the related concept of a closure are discussed in the section called "Function literals and Closures" in Chapter 8, Functional Programming in Scala.
字面函数和闭包相关的概念会在《第8章- scala函数式编程》的“字面函数和闭包”章节中被讨论。
应用推荐