Skip to content

Commit add689c

Browse files
mgsongViolet-Bora-Lee
authored andcommitted
[data-types] fix typo
1 parent 29dfb58 commit add689c

File tree

1 file changed

+1
-1
lines changed
  • 1-js/05-data-types/01-primitives-methods/1-string-new-property

1 file changed

+1
-1
lines changed

1-js/05-data-types/01-primitives-methods/1-string-new-property/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ alert(str.test);
1717

1818
1. `str`의 프로퍼티에 접근하려 하면 "래퍼 객체"가 만들어집니다.
1919
2. 엄격 모드에선 래퍼 객체를 수정하려 할 때 에러가 발생합니다.
20-
3. 비 엄격 모드에선 에러가 발생하지 않습니다. 래퍼 객체에 프로퍼티 `str`가 추가되죠. 그런데 래퍼 객체는 바로 삭제되기 때문에 마지막 줄이 실행될 땐 프로퍼티 `str` 찾을 수 없습니다.
20+
3. 비 엄격 모드에선 에러가 발생하지 않습니다. 래퍼 객체에 프로퍼티 `test`가 추가되죠. 그런데 래퍼 객체는 바로 삭제되기 때문에 마지막 줄이 실행될 땐 프로퍼티 `test` 찾을 수 없습니다.
2121

2222
**위 예시를 통해 원시값과 객체는 다르다는 것을 다시 한번 확인해 보았습니다.**
2323

0 commit comments

Comments
 (0)