Number.parseInt()
parses a string and returns an integer.
it is a static function on Number
is the same as the global function parseInt
parseInt
was specified in ECMAScript v1 (please find that ES1 kata for learning more)
Links
Description of `Number.parseInt()` in the specification.
The MDN docs for this function.
Spec chapter of the global `parseInt()` function.
A twitter thread, where I explained the decision process of the creation of this kata and how it relates to the ES1 kata of this function.
Required Knowledge
- `parseInt()` (Global Object API)
- basics (Arrow functions)
- `const` declaration (Block scope)
Related Katas
Number API
Number.isInteger()
Number.isNaN()
Number.parseInt()
Difficulty Level
BEGINNER
First Published
6 October 2019
Stats
3 tests to solve