You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
보통의 객체처럼 생성자에는 속성을 추가할 수 없어요. 한 번에 모든 객체에 기능을 추가하고 싶다면, 프로토 타입을 사용해야 해요. 그래서 이 경우에,
366
+
보통의 객체처럼 생성자에는 속성을 추가할 수 없어요. 한 번에 모든 객체에 기능을 추가하고 싶다면, 프로토타입을 사용해야 해요. 그래서 이 경우에,
367
367
368
368
```js
369
369
Person.prototype.getFullName=function() {
@@ -470,7 +470,7 @@ sum(1, "2");
470
470
471
471
#### 정답: C
472
472
473
-
JavaScript는 **동적으로 만들어진 언어**에요: 특정변수가 어떤 타입인지 지정하지 않아요. 변수는 당신이 모르는 사이에 자동으로 다른 타입으로 변환 될 수 있는데, 이걸 _암묵적 타입 변환_ 이라고 불러요. **Coercion**은 하나의 타입을 다른 타입으로 변환하는 거에요.
473
+
JavaScript는 **동적으로 만들어진 언어**에요: 특정변수가 어떤 형인지 지정하지 않아요. 변수는 당신이 모르는 사이에 자동으로 다른 형으로 변환 될 수 있는데, 이걸 _암묵적 형 변환_ 이라고 불러요. **Coercion**은 하나의 형을 다른 형으로 변환하는 거에요.
474
474
475
475
이 예제에서, 함수가 이해하고 값을 리턴하도록, JavaScript는 숫자 `1`을 문자열로 변환해요. 수형 (`1`)와 문자열형 (`'2'`)의 추가 중에는, 숫자는 문자열로 취급되요. `"Hello" + "World"`처럼 문자열을 연결할 수 있어요, 따라서 여기 `"1" + "2"`는 `"12"`을 리턴하는 일이 발생해요.
476
476
@@ -932,7 +932,7 @@ WebAPI는 준비가 될때 마다 stack에 항목을 추가 할 수 없어요.
932
932
933
933
---
934
934
935
-
###### 31. What is the event.target when clicking the button?
935
+
###### 31. 버튼을 클릭했을때 event.target은 무엇일까요?
936
936
937
937
```html
938
938
<divonclick="console.log('first div')">
@@ -944,24 +944,24 @@ WebAPI는 준비가 될때 마다 stack에 항목을 추가 할 수 없어요.
944
944
</div>
945
945
```
946
946
947
-
- A: Outer`div`
948
-
- B: Inner`div`
947
+
- A: 외부의`div`
948
+
- B: 내부의`div`
949
949
- C: `button`
950
-
- D: An array of all nested elements.
950
+
- D: 중첩된 모든 요소의 배열
951
951
952
952
<details><summary><b>정답</b></summary>
953
953
<p>
954
954
955
955
#### 정답: C
956
956
957
-
The deepest nested element that caused the event is the target of the event. You can stop bubbling by `event.stopPropagation`
957
+
가장 깊이 중첩된 요소가 이벤트를 발생시킬 이벤트 대상이에요. `event.stopPropagation`을 통해서 버블링을 중단 할 수 있어요.
958
958
959
959
</p>
960
960
</details>
961
961
962
962
---
963
963
964
-
###### 32. When you click the paragraph, what's the logged output?
964
+
###### 32. p태그를 클릭하면 로그의 출력은 무엇일까요 ?
965
965
966
966
```html
967
967
<divonclick="console.log('div')">
@@ -981,7 +981,7 @@ The deepest nested element that caused the event is the target of the event. You
981
981
982
982
#### 정답: A
983
983
984
-
If we click `p`, we see two logs: `p`and`div`. During event propagation, there are 3 phases: capturing, target, and bubbling. By default, event handlers are executed in the bubbling phase (unless you set `useCapture` to `true`). It goes from the deepest nested element outwards.
984
+
`p`를 클릭하면, 2개의 로그를 볼 수 있어요: `p`그리고`div`. 이벤트의 전파 중에는 3 단계가 있어요: 캡처링, 타켓, 버블링. 기본적으로, 이벤트 핸들러는 버블링단계에서 시작되요. (`useCapture`를 `true`로 설정하지 않는 한). 가장 깊게 중첩된 요소로 부터 바깥쪽으로 나가요.
985
985
986
986
</p>
987
987
</details>
@@ -1011,9 +1011,9 @@ sayHi.bind(person, 21);
1011
1011
1012
1012
#### 정답: D
1013
1013
1014
-
With both, we can pass the object to which we want the `this` keyword to refer to. However, `.call` is also _executed immediately_!
1014
+
두개 모두, `this`키워드를 참조하고자하는 객체로 보낼 수 있어요. 그러나, `.call`은 _즉시 실행되요_!
1015
1015
1016
-
`.bind.` returns a _copy_ of the function, but with a bound context! It is not executed immediately.
1016
+
`.bind.`는 함수의 _복사본_ 을 리턴하지만, 바인딩 컨텍스트에요! 이건 즉시 실행되지 않아요.
1017
1017
1018
1018
</p>
1019
1019
</details>
@@ -1040,16 +1040,16 @@ typeof sayHi();
1040
1040
1041
1041
#### 정답: B
1042
1042
1043
-
The `sayHi` function returns the returned value of the immediately invoked function (IIFE). This function returned `0`, which is type `"number"`.
1043
+
`sayHi`함수는 즉시 호출 함수(IIFE)로서 리턴된 값을 리턴해요. 이 함수는 `0`을 리턴하고, 형은 `"number"`이에요.
1044
1044
1045
-
FYI: there are only 7 built-in types: `null`, `undefined`, `boolean`, `number`, `string`, `object`, and`symbol`. `"function"` is not a type, since functions are objects, it's of type `"object"`.
1045
+
참고: 단 7개의 내장형이 있어요: `null`, `undefined`, `boolean`, `number`, `string`, `object` 그리고`symbol`. `"function"`은 객체이기 때문에 형이아니라 `"object"` 형이에요.
When you set a value to an element in an array that exceeds the length of the array, JavaScript creates something called "empty slots". These actually have the value of `undefined`, but you will see something like:
1131
+
배열의 길이를 초과한 값을 배열의 요소로 설정하고자 할때, JavaScript는 "empty slots"이라고 불리는 것을 생성해요. 이것은 실제로 `undefined`의 값을 가지고 있지만, 다음과 같은 것을 보게 될거에요:
1132
1132
1133
1133
`[1, 2, 3, 7 x empty, 11]`
1134
1134
1135
1135
depending on where you run it (it's different for every browser, node, etc.)
1136
+
실행 위치에 따라 달라요 (브라우저, node 등마다 달라요.)
1136
1137
1137
1138
</p>
1138
1139
</details>
@@ -1165,34 +1166,34 @@ depending on where you run it (it's different for every browser, node, etc.)
1165
1166
1166
1167
#### 정답: A
1167
1168
1168
-
The `catch` block receives the argument `x`. This is not the same `x` as the variable when we pass arguments. This variable `x`is block-scoped.
1169
+
`catch`블록은 `x`의 인자를 받아요. 이것은 인수를 전달할때 변수로서의 `x`와는 달라요. 이 `x`변수는 블록-스코프에요.
1169
1170
1170
-
Later, we set this block-scoped variable equal to `1`, and set the value of the variable `y`. Now, we log the block-scoped variable`x`, which is equal to `1`.
1171
+
후에, 블록-스코프 변수는 `1`로 설정하고, 변수 `y`의 값을 설정해요. 여기서, 블록-스코프의 변수`x`를 출력하는데, 이것은 `1`이에요.
1171
1172
1172
-
Outside of the `catch`block, `x` is still `undefined`, and `y` is `2`. When we want to `console.log(x)` outside of the `catch` block, it returns `undefined`, and `y` returns `2`.
1173
+
`catch`블록 밖에서, `x`는 여전히 `undefined`이고 `y`는 `2`이에요. `catch` 블록 밖에서 `console.log(x)`를 출력하면, `undefined`을 리턴하고. 그리고 `y`는 `2`를 리턴해요.
1173
1174
1174
1175
</p>
1175
1176
</details>
1176
1177
1177
1178
---
1178
1179
1179
-
###### 39. Everything in JavaScript is either a...
1180
+
###### 39. JavaScript의 모든 것은...
1180
1181
1181
-
- A: primitive or object
1182
-
- B: function or object
1183
-
- C: trick question! only objects
1184
-
- D: number or object
1182
+
- A: primitive 또는 object
1183
+
- B: function 또는 object
1184
+
- C: 함정 문제! objects만
1185
+
- D: number 또는 object
1185
1186
1186
1187
<details><summary><b>정답</b></summary>
1187
1188
<p>
1188
1189
1189
1190
#### 정답: A
1190
1191
1191
-
JavaScript only has primitive types and objects.
1192
+
JavaScript는 원시형과 객체만 가지고 있어요.
1192
1193
1193
-
Primitive types are `boolean`, `null`, `undefined`, `bigint`, `number`, `string`, and`symbol`.
What differentiates a primitive from an object is that primitives do not have any properties or methods; however, you'll note that `'foo'.toUpperCase()` evaluates to `'FOO'` and does not result in a `TypeError`. This is because when you try to access a property or method on a primitive like a string, JavaScript will implicity wrap the object using one of the wrapper classes, i.e. `String`, and then immediately discard the wrapper after the expression evaluates. All primitives except for `null`and`undefined` exhibit this behaviour.
1196
+
원시형과 객체를 구별하는 법은 원시형에는 속성이나 메소드가 없어요. 그러나 `'foo'.toUpperCase()`는 `'FOO'`로 평가되어, `TypeError`의 결과가 되지 않아요. 문자열과 같은 원시형이 속성 또는 메소드에 접근하려고 할때, JavaScript는 래퍼 클래스 중 하나인 `String`을 사용하여 암묵적으로 감싸고, 표현식이 평가된 후 즉시 래퍼를 폐기하기 때문이에요. `null`그리고`undefined`를 제외한 모든 원시형은 이러한 행동을 합니다.
1196
1197
1197
1198
</p>
1198
1199
</details>
@@ -1220,9 +1221,9 @@ What differentiates a primitive from an object is that primitives do not have an
1220
1221
1221
1222
#### 정답: C
1222
1223
1223
-
`[1, 2]` is our initial value. This is the value we start with, and the value of the very first `acc`. During the first round, `acc` is `[1,2]`, and `cur` is `[0, 1]`. We concatenate them, which results in `[1, 2, 0, 1]`.
1224
+
`[1, 2]`은 초기값이에요. 이것이 최초의 값으로, 제일 처음의 `acc`의 값이에요. 처음 라운드 동안에 `acc`은 `[1,2]`이며, `cur`은 `[0, 1]`이에요. 그것들을 연결하면 결과적으로 `[1, 2, 0, 1]`이 되요.
1224
1225
1225
-
Then, `[1, 2, 0, 1]` is `acc` and `[2, 3]` is `cur`. We concatenate them, and get `[1, 2, 0, 1, 2, 3]`
0 commit comments