Skip to content

Commit

Permalink
Update Object.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yihan12 authored Dec 14, 2023
1 parent 6c9fe84 commit e046a17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/Data Types/Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ console.log(Reflect.ownKeys(person1)) //  ['getFooENUM', 'getFoo', 'name', 'age
```

### 对象的setter和getter
> getter 是一个获取某个特定属性的值的方法。
> setter 是一个设定某个属性的值的方法。
> 你可以为预定义的或用户定义的对象定义 getter 和 setter 以支持新增的属性。
```javascript
const person = {
Expand Down

0 comments on commit e046a17

Please sign in to comment.