Skip to content

Commit df1523a

Browse files
authored
👾 add information about test functions to summary section
1 parent 2901e0c commit df1523a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ For different numeral systems:
429429
- `parseInt(str, base)` parses the string `str` into an integer in numeral system with given `base`, `2 ≤ base ≤ 36`.
430430
- `num.toString(base)` converts a number to a string in the numeral system with the given `base`.
431431

432+
For regular number tests:
433+
- `isNaN(value)` converts its argument to a number and then tests it for being `NaN`
434+
- `isFinite(value)` converts its argument to a number and returns `true` if it's a regular number, not `NaN/Infinity/-Infinity`
435+
432436
For converting values like `12pt` and `100px` to a number:
433437

434438
- 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)