Skip to content

Commit 150def6

Browse files
GreatLaboratoryViolet-Bora-Lee
authored andcommitted
[객체] - Object with const can be changed 번역 #696
1 parent 3e31d60 commit 150def6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ let user = {
9292
```
9393
이런 쉼표를 'trailing(길게 늘어지는)' 혹은 'hanging(매달리는)' 쉼표라고 부릅니다. 이렇게 끝에 쉼표를 붙이면 모든 프로퍼티가 유사한 형태를 보이기 때문에 프로퍼티를 추가, 삭제, 이동하는 게 쉬워집니다.
9494

95-
````smart header="Object with const can be changed"
96-
Please note: an object declared as `const` *can* be modified.
95+
````smart header="상수 객체는 수정될 수 있습니다."
96+
주의하세요. `const`로 선언된 객체는 수정될 수 있습니다.
9797
98-
For instance:
98+
예시:
9999
100100
```js run
101101
const user = {
@@ -109,11 +109,11 @@ user.name = "Pete"; // (*)
109109
alert(user.name); // Pete
110110
```
111111
112-
It might seem that the line `(*)` would cause an error, but no. The `const` fixes the value of `user`, but not its contents.
112+
`(*)`로 표시한 줄에서 오류를 일으키는 것처럼 보일 수 있지만 그렇지 않습니다. `const``user`의 값을 고정하지만, 그 내용은 고정하지 않습니다.
113113
114-
The `const` would give an error only if we try to set `user=...` as a whole.
114+
`const``user=...`를 전체적으로 설정하려고 할 때만 오류가 발생합니다.
115115
116-
There's another way to make constant object properties, we'll cover it later in the chapter <info:property-descriptors>.
116+
상수 객체 프로퍼티를 만드는 또 다른 방법이 있습니다. 이후에 <info:property-descriptors> 챕터에서 다루겠습니다.
117117
````
118118

119119
## 대괄호 표기법

0 commit comments

Comments
 (0)