Challenge use-the-parseint-function has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
The parameters in the test string visible to the user aren't changed.
convertToInteger("56") should return a number
convertToInteger("56") should return 56
convertToInteger("56") should return 77 // 56 != 77.
convertToInteger("JamesBond") should return NaN
```js
function convertToInteger(str) {
return parseInt(str);
}
convertToInteger("56");
```
@kprenesti Thanks for QA'ing and reporting this issue!
Since you reported it, you get dibs on fixing it if you want. 馃檪 If you don't want to, please let us know and we'll open it up to the community. 馃憤
The tests for this challenge are here. The test is testing for 77, but the message wasn't updated properly.
The JamesBond test is also broken, if you could fix that as well that would be great!
assert(!isNaN(convertToInteger(\"JamesBond\")); , ...);
should be
assert.isNaN(convertToInteger("JamesBond"), ...);
To get your local development environment set up, check out our CONTRIBUTING.md.
If you need help, please go to our contributors chatroom.
Happy coding! 馃槃
@kprenesti To add to what @systimotic has said, the test should be assert.isNaN(convertToInteger("JamesBond"),
because the isNaN test isn't working as should. I just submitted a PR that you can compare with #12737
Thanks @dhcodes! I updated my message.
Hi folks, I'm going to clean up the formatting/title capitalization/etc. for the last four challenges in the JS section (that are new). I'll fix this issue and #12727 as well.
Most helpful comment
Hi folks, I'm going to clean up the formatting/title capitalization/etc. for the last four challenges in the JS section (that are new). I'll fix this issue and #12727 as well.