Created
September 30, 2019 00:20
-
-
Save parzibyte/16b68ddda4237cc49e9a762cbe56e4d0 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* Ejemplos y explicación de Array Map | |
* en JavaScript | |
* | |
* https://parzibyte.me/blog | |
* | |
*/ | |
const numerosString = ["20", "515", "800"]; | |
const numerosInt = numerosString.map(function(numeroComoString){ | |
return parseInt(numeroComoString); | |
}); | |
console.log(numerosInt); | |
/* | |
Salida: | |
[ 20, 515, 800 ] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment