Merge pull request #3016 from Rnbsov/patch-50

👾 add information about test functions to summary section
This commit is contained in:
Ilya Kantor 2022-06-13 14:12:02 +02:00 committed by GitHub
commit da645b513f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -432,6 +432,11 @@ For different numeral systems:
- `parseInt(str, base)` parses the string `str` into an integer in numeral system with given `base`, `2 ≤ base ≤ 36`.
- `num.toString(base)` converts a number to a string in the numeral system with the given `base`.
For regular number tests:
- `isNaN(value)` converts its argument to a number and then tests it for being `NaN`
- `isFinite(value)` converts its argument to a number and returns `true` if it's a regular number, not `NaN/Infinity/-Infinity`
For converting values like `12pt` and `100px` to a number:
- 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.