File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
1-js/05-data-types/02-number Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff 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+
435440For 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.
You can’t perform that action at this time.
0 commit comments