主题
技术英语 10 分钟 - 2026-06-22
今日目标
用 10 分钟练会技术文档里描述函数返回值的句子,重点看懂 ends function execution 和 returned to the function caller。
来源类型:MDN Web Docs, browser and JavaScript
原文
来源主题:公开 MDN Web Docs 里的 JavaScript return statement 说明。
The return statement ends function execution and specifies a value to be returned to the function caller.参考链接:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return
人话意思
这句话是在说:return 会让函数停止继续执行,并指定一个值,把这个值交回给调用这个函数的地方。
看到 ends function execution,不要硬翻成很绕的“结束函数执行过程”,顺手理解成“函数到这里停下”。
看到 returned to the function caller,重点是“返回给调用方”。调用方可以是另一行代码、另一个函数,或者你在控制台里执行的那次调用。
关键词
- return statement: 返回语句
- ends: 结束,停止
- function execution: 函数执行
- specifies a value: 指定一个值
- returned to: 返回给
- function caller: 函数调用方
句子拆解
The return statement ends function execution and specifies a value to be returned to the function caller.主语是:
The return statement第一个动作是:
ends function execution第二个动作是:
specifies a value后面这段说明这个值要去哪里:
to be returned to the function caller整句骨架可以压成:
A ends B and specifies C.意思是:某个东西结束 B,并指定 C。
技术文档里这种结构很常见,因为它喜欢一次讲清楚“动作”和“结果”:
The command stops the server and prints a message.The option disables caching and returns fresh data.今天记住一句
The return statement ends function execution and specifies a value.以后看到 ends 加一个技术动作,比如 ends execution、ends the request、ends the session,先按“让这个过程停止”理解。
30 秒小练习
把下面这句翻成中文:
The command stops the server and prints a message.提示:stops the server 是“停止服务器”,prints a message 是“打印一条消息”。
完成记录
- [ ] 看完原文
- [ ] 看完拆解
- [ ] 完成 30 秒小练习