Skip to content

Commit 9ba2bd6

Browse files
authored
Merge pull request javascript-tutorial#360 from fakeinc/master
Make the description more readable.
2 parents 7e7e1d9 + 358f770 commit 9ba2bd6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

1-js/02-first-steps/06-type-conversions/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ alert(age); // NaN, conversion failed
6363

6464
number 类型转换规则:
6565

66-
| | 变成... |
66+
| 输入 | 输出 |
6767
|-------|-------------|
6868
|`undefined`|`NaN`|
6969
|`null`|`0`|
7070
|<code>true&nbsp;&nbsp;false</code> | `1` and `0` |
71-
| `string` | 字符串开始和末尾的空白会被移除,剩下的如果是空字符串,结果为 `0`,否则 —— 从字符串中读出数字。错误返回 `NaN`|
71+
| `string` | 去掉首尾空格后的纯数字字符串中含有的数字。<br>如果字符串只由空格字符组成,返回 `0`。<br>如果字符串不是纯数字,则返回 `NaN`|
7272

7373
例如:
7474

0 commit comments

Comments
 (0)