Skip to content

Commit 5523f42

Browse files
authored
Merge pull request wangdoc#44 from nextchentong/update-text
fix:text
2 parents c41abf3 + 652dbb3 commit 5523f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ w.age += 1;
336336
r.age // 43
337337
```
338338

339-
上面示例中,变量`w``r`指向同一个对象,其中`w`是可写的,`r`的只读的。那么,对`w`的属性修改,会影响到`r`
339+
上面示例中,变量`w``r`指向同一个对象,其中`w`是可写的,`r`是只读的。那么,对`w`的属性修改,会影响到`r`
340340

341341
如果希望属性值是只读的,除了声明时加上`readonly`关键字,还有一种方法,就是在赋值时,在对象后面加上只读断言`as const`
342342

0 commit comments

Comments
 (0)