Skip to content

Instantly share code, notes, and snippets.

@javierbrea
Created August 31, 2011 08:58
Show Gist options
  • Save javierbrea/1183114 to your computer and use it in GitHub Desktop.
Save javierbrea/1183114 to your computer and use it in GitHub Desktop.
Autoejecutable cuenta 100 sin condicionales. #gejs Reunion 5. Ejercicio 3
(Array(100)).toString().split(',').map(function(x,i){console.log(i+1);});
@eamodeorubio
Copy link

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

@javierbrea
Copy link
Author

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