Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 24, 2019 15:20
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/97174a89a1169d69e788ea5b1869cdba to your computer and use it in GitHub Desktop.
Save parzibyte/97174a89a1169d69e788ea5b1869cdba to your computer and use it in GitHub Desktop.
const canciones = [
"Hang onto yourself",
"Go your own way",
"Modern Love",
];
// Tercer ejemplo recibiendo el arreglo
const funcionQueRecorreConIndiceYArreglo = function(cancion, indice, arreglo) {
console.log("Tenemos la canción %s en el índice %d. El arreglo completo es %s", cancion, indice, arreglo);
}
canciones.forEach(funcionQueRecorreConIndiceYArreglo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment