Skip to content

Commit 672bb99

Browse files
committed
question 11-15
1 parent bf8230c commit 672bb99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README-zh_CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ console.log(sarah)
395395

396396
对于 `sarah`,我们没有使用 `new` 关键字。当使用 `new` 时,`this` 引用我们创建的空对象。当使用了 `new``this` 引用的是**全局对象**(global object)。
397397

398-
我们说 `this.firstName` 等于 `"Sarah"`,并且 `this.lastName` 等于 `"Smith"`。实际上我们做的是,定义了 `global.firstName = 'Sarah'``global.lastName = 'Smith'`。而 `sarah` 本身是 `undefined`.
398+
我们说 `this.firstName` 等于 `"Sarah"`,并且 `this.lastName` 等于 `"Smith"`。实际上我们做的是,定义了 `global.firstName = 'Sarah'``global.lastName = 'Smith'`。而 `sarah` 本身是 `undefined`
399399

400400
</p>
401401
</details>
@@ -460,9 +460,9 @@ sum(1, '2')
460460

461461
#### 答案: C
462462

463-
JavaScript is a **dynamimcally typed language**: we don't specify what types certain variables are. Values can automatically be converted into another type without you knowing, which is called _implicit type coercion_. **Coercion** is converting from one type into another.
463+
JavaScript 是一种**动态类型语言**:我们不指定某些变量的类型。值可以在你不知道的情况下自动转换成另一种类型,这种类型称为_隐式类型转换_(implicit type coercion)。**Coercion** 是指将一种类型转换为另一种类型。
464464

465-
In this example, JavaScript converts the number `1` into a string, in order for the function to make sense and return a value. During the addition of a numeric type (`1`) and a string type (`'2'`), the number is treated as a string. We can concatenate strings like `"Hello" + "World"`, so what's happening here is `"1" + "2"` which returns `"12"`.
465+
在本例中,JavaScript 将数字 `1` 转换为字符串,以便函数有意义并返回一个值。在数字类型(`1`)和字符串类型(`'2'`)相加时,该数字被视为字符串。我们可以连接字符串,比如 `"Hello" + "World"`,这里发生的是 `"1" + "2"`,它返回 `"12"`
466466

467467
</p>
468468
</details>

0 commit comments

Comments
 (0)