Skip to content

Conversation

@Restuta
Copy link

@Restuta Restuta commented Aug 10, 2017

As indicated in the example I tried ['1', '2', '3'].forEach(parseInt); and got undefined as expected. I am not sure why would it output anything else, since forEach doesn't return anything, but when I run ['1', '2', '3'].map(parseInt); I got [1, NaN, NaN] which is not what I expected. So I think this better illustrates the problem.

As indicated in the example I tried `['1', '2', '3'].forEach(parseInt);` and god `undefined` _as expected. I am not sure why would it output anything else, since forEach doesn't return anything, but when I run `['1', '2', '3'].map(parseInt);` I got `[1, NaN, NaN]` which is not what I expected. So I think this better illustrates the problem.
@graingert
Copy link
Collaborator

I've recently merged #62 which fixed the travis tests. Please could you rebase this PR to re-run the travis tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants