Skip to content

Commit 6040c35

Browse files
committedSep 5, 2019
改正语序
1 parent 583edc3 commit 6040c35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎docs/module.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ import {a} from './xxx.js'
221221
a.foo = 'hello'; // 合法操作
222222
```
223223

224-
上面代码中,`a`的属性可以成功改写,并且其他模块也可以读到改写后的值。不过,这种写法很难查错,建议凡是输入的变量,都当作完全只读,轻易不要改变它的属性
224+
上面代码中,`a`的属性可以成功改写,并且其他模块也可以读到改写后的值。不过,这种写法很难查错,建议凡是输入的变量,都当作完全只读,不要轻易改变它的属性
225225

226226
`import`后面的`from`指定模块文件的位置,可以是相对路径,也可以是绝对路径,`.js`后缀可以省略。如果只是模块名,不带有路径,那么必须有配置文件,告诉 JavaScript 引擎该模块的位置。
227227

0 commit comments

Comments
 (0)
Please sign in to comment.