Created
January 2, 2018 23:45
-
-
Save jesselima/6e780e730947094d45e0883a3b0d6416 to your computer and use it in GitHub Desktop.
entendendo-es6 created by jesselimatech - https://repl.it/@jesselimatech/entendendo-es6
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
console.log('-----\n-----'); | |
var canais = ['sbt', 'globo', 'record']; | |
canais.forEach(function(canal){ | |
canais.push('cultura'); // este item foi adicionado depois da primeira chamada dpo callback e não entrará na intereção do forEach | |
console.log(canal); | |
}); | |
// já neste a cultura foi adicionado | |
console.log('-----\n-----'); | |
canais.forEach(function(canal){ | |
console.log(canal); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment