-
-
Save Ifmr24/ecff0aa48d57a8322bb26b19172020d3 to your computer and use it in GitHub Desktop.
JS Condicional Switch
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
// CONDICIONAL SWITCH | |
var edad = 18; | |
var imprime = ""; | |
switch (edad) { | |
case 18: | |
imprime = "Tu edad es 18"; | |
break; | |
case 20: | |
imprime = "Tu edad es 20"; | |
break; | |
default: | |
imprime = "Tu edad es neutra"; | |
break; | |
} | |
console.log(imprime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment