Last active
May 12, 2020 06:08
-
-
Save prof3ssorSt3v3/d7e260a0d25beaaedb1fd02d54a214b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Why do we get this weird result from the map method? | |
// myarray.map(func); | |
//We want to convert 3 strings into numbers | |
let result = ['1', '7', '11'].map(parseInt); //returns [1, NaN, 3] | |
console.log(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment