Skip to content

Commit fc7d075

Browse files
committed
Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages
2 parents 0af6108 + 5c86056 commit fc7d075

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/number.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Math.trunc = Math.trunc || function(x) {
353353

354354
### Math.sign()
355355

356-
`Math.sign`方法用来判断一个数到底是正数、负数、还是零。
356+
`Math.sign`方法用来判断一个数到底是正数、负数、还是零。对于非数值,会先将其转换为数值。
357357

358358
它会返回五种值。
359359

@@ -369,6 +369,7 @@ Math.sign(5) // +1
369369
Math.sign(0) // +0
370370
Math.sign(-0) // -0
371371
Math.sign(NaN) // NaN
372+
Math.sign('9'); // +1
372373
Math.sign('foo'); // NaN
373374
Math.sign(); // NaN
374375
```

0 commit comments

Comments
 (0)