Created
August 31, 2011 08:58
-
-
Save javierbrea/1183114 to your computer and use it in GitHub Desktop.
Autoejecutable cuenta 100 sin condicionales. #gejs Reunion 5. Ejercicio 3
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
(Array(100)).toString().split(',').map(function(x,i){console.log(i+1);}); |
Correcto, pero aunque sea lo mismo "forEach" semánticamente me parecía más impugnable por buclear ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Esta también es buena, pero en vez de usar map usa forEach ya que no estás interesado en transformar el array sino sólo en recorrerlo