Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 30, 2019 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/73ec42d71b11ff8520985f14dd289b1b to your computer and use it in GitHub Desktop.
Save parzibyte/73ec42d71b11ff8520985f14dd289b1b to your computer and use it in GitHub Desktop.
/**
* Ejemplos y explicación de Array Map
* en JavaScript
*
* https://parzibyte.me/blog
*
*/
const numerosString = ["20", "515", "800"];
const numerosInt = numerosString.map((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