Skip to content

Commit 5a29083

Browse files
authored
Update article.md
1 parent 7ad4092 commit 5a29083

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

1-js/04-object-basics/01-object/article.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ let key = "likes birds";
129129
user[key] = true;
130130
```
131131

132-
133132
在这里,变量 `key` 根据用户的输入在运行的时候计算,我们根据它来获取属性。这给了我们很大的灵活性,点属性就用不了了。
134133

135134
例如:
@@ -146,7 +145,6 @@ let key = prompt("What do you want to know about the user?", "name");
146145
alert( user[key] ); // John (如果输入 "name" )
147146
```
148147

149-
150148
### 计算属性
151149

152150
我们可以在对象字面量中使用方括号。这叫做**计算属性**

0 commit comments

Comments
 (0)