Skip to content

Instantly share code, notes, and snippets.

@urielhdz
Created June 28, 2017 21:58
Show Gist options
  • Save urielhdz/a515f17c462c0d1128a8703effacb41b to your computer and use it in GitHub Desktop.
Save urielhdz/a515f17c462c0d1128a8703effacb41b to your computer and use it in GitHub Desktop.
Obtener pares de ciclos
let arreglo [1,2,3,4,5];
let newArreglo = [];
for(var i = 0;i < arreglo.length; i++){
if(arreglo[i] % 2 == 0) newArreglo.push(arreglo[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment