-
-
Save Ifmr24/8589f92fd961d1530b2b180163e1bcbf to your computer and use it in GitHub Desktop.
JS Bucle While
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
// 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