V2EX  ›  英汉词典
Enqueued related words: Arrow Function

Anonymous Function

释义 Definition

匿名函数:一种没有显式名称的函数,常用于临时逻辑、作为参数传递(如回调),或在局部范围内快速定义功能。(在不同语言里也常与 lambdafunction literal 等概念相关。)

发音 Pronunciation

/əˈnɑːnɪməs ˈfʌŋkʃən/

词源 Etymology

anonymous 源自希腊语 anōnymos(“无名的”:an- “无” + onyma/onoma “名字”);function 源自拉丁语 functio(“执行、履行”)。合起来字面意思就是“无名的函数”,在计算机领域指不为其单独命名、直接就地定义并使用的函数。

例句 Examples

I used an anonymous function as a callback.
我用一个匿名函数作为回调。

In JavaScript, an anonymous function can capture variables from its surrounding scope, which is useful for creating closures.
在 JavaScript 中,匿名函数可以捕获其周围作用域的变量,这对创建闭包很有用。

相关词 Related Words

文学/著作中的用例 Literary Works

  • JavaScript: The Good Parts(Douglas Crockford)
  • Eloquent JavaScript(Marijn Haverbeke)
  • Structure and Interpretation of Computer Programs(Harold Abelson & Gerald Jay Sussman)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5309 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 09:42 · PVG 17:42 · LAX 02:42 · JFK 05:42
♥ Do have faith in what you're doing.