Appearance
技术英语 10 分钟 - 2026-06-01
今日目标
看懂 JavaScript 函数里 parameter 和 return value 的基本表达。
原文
A function can receive parameters and use them inside its body.When the function finishes, it can return a value to the code that called it.人话意思
一个函数可以接收参数,然后在函数体里面使用这些参数。
函数运行结束时,可以把一个值返回给调用它的那段代码。
关键词
- function: 函数,一段可以被调用的代码
- parameter: 参数,传给函数使用的名字或值
- body: 函数体,真正执行逻辑的代码块
- return a value: 返回一个值
- call a function: 调用一个函数
句子拆解
A function can receive parameters主语是 A function,动作是 can receive,对象是 parameters。这里的 can 不是“会不会”的考试语气,而是技术文档里常见的“可以、能够”。
them 指前面的 parameters。inside its body 是位置说明,意思是在这个函数自己的函数体里。
that called it 用来修饰 the code,意思是“调用它的那段代码”。这里的 it 指这个函数。
今天记住一句
The function returns a value.30 秒小练习
把这句翻成中文:
This function receives a parameter and returns a string.完成记录
- [ ] 看完原文
- [ ] 看完拆解
- [ ] 完成 30 秒小练习