Skip to content

Commit da645b5

Browse files
authored
Merge pull request #3016 from Rnbsov/patch-50
👾 add information about test functions to summary section
2 parents 9e72417 + ef5bb39 commit da645b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

1-js/05-data-types/02-number/article.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@ For different numeral systems:
432432
- `parseInt(str, base)` parses the string `str` into an integer in numeral system with given `base`, `2 ≤ base ≤ 36`.
433433
- `num.toString(base)` converts a number to a string in the numeral system with the given `base`.
434434

435+
For regular number tests:
436+
437+
- `isNaN(value)` converts its argument to a number and then tests it for being `NaN`
438+
- `isFinite(value)` converts its argument to a number and returns `true` if it's a regular number, not `NaN/Infinity/-Infinity`
439+
435440
For converting values like `12pt` and `100px` to a number:
436441

437442
- Use `parseInt/parseFloat` for the "soft" conversion, which reads a number from a string and then returns the value they could read before the error.

0 commit comments

Comments
 (0)