Skip to content

Instantly share code, notes, and snippets.

@Ifmr24
Created September 18, 2018 00:10
Show Gist options
  • Save Ifmr24/8589f92fd961d1530b2b180163e1bcbf to your computer and use it in GitHub Desktop.
Save Ifmr24/8589f92fd961d1530b2b180163e1bcbf to your computer and use it in GitHub Desktop.
JS Bucle While
// BUCLE WHILE
// BUCLE WHILE ES MENOS ESTRICTO QUE FOR
var year = 2018;
// Mientras que year sea igual o menor a 2051
while(year <= 2051){
//Ejecuta esto
console.log("Estamos en el año: "+year)
//Incrementamos la variable year para que cuando llegue a 2051 se pare el bucle
year++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment