Skip to content

Commit f291b6d

Browse files
authored
fix: 优化翻译
1 parent 774be15 commit f291b6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

1-js/11-async/01-callbacks/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function loadScript(src) {
2828
}
2929
```
3030

31-
它使用给定的 `src` 将一个新的、动态创建的标签 `<script src="…">` 插入到文档中。浏览器将自动开始加载它,并在加载完成后执行它。
31+
它将一个新的、带有给定 `src` 、动态创建的标签 `<script src="…">` 插入到文档中。浏览器将自动开始加载它,并在加载完成后执行它。
3232

3333
我们可以像这样使用这个函数:
3434

@@ -103,7 +103,7 @@ function loadScript(src, callback) {
103103

104104
*!*
105105
loadScript('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js', script => {
106-
alert(`Cool, the script ${script.src} is loaded`);
106+
alert(`酷,脚本 ${script.src} 加载完成`);
107107
alert( _ ); // _ 是所加载的脚本中声明的一个函数
108108
});
109109
*/!*
@@ -122,11 +122,11 @@ loadScript('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js', s
122122
```js
123123
loadScript('/my/script.js', function(script) {
124124

125-
alert(`Cool, the ${script.src} is loaded, let's load one more`);
125+
alert(`酷,脚本 ${script.src} 加载完成,让我们继续加载另一个吧`);
126126

127127
*!*
128128
loadScript('/my/script2.js', function(script) {
129-
alert(`Cool, the second script is loaded`);
129+
alert(`酷,第二个脚本加载完成`);
130130
});
131131
*/!*
132132

0 commit comments

Comments
 (0)