File tree 1 file changed +4
-0
lines changed
1-js/05-data-types/02-number
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -429,6 +429,10 @@ For different numeral systems:
429
429
- `parseInt(str, base)` parses the string `str` into an integer in numeral system with given `base`, `2 ≤ base ≤ 36`.
430
430
- `num.toString(base)` converts a number to a string in the numeral system with the given `base`.
431
431
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
+
432
436
For converting values like `12pt` and `100px` to a number:
433
437
434
438
- 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