Created
September 15, 2020 06:56
-
-
Save asirheras/bdaadb84423337c6a71cec9e6047d8fa to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/parocej
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
Condición IF-ELSE - Ejemplo MAYORIA DE EDAD | |
<script id="jsbin-javascript"> | |
let edad=17; | |
if (edad>17){ | |
console.log("Eres mayor de edad"); | |
}else{ | |
console.log("No eres mayor de edad"); | |
}/*el bloque ELSE solo se ejecutará si la variable edad<=17*/ | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">let edad=17; | |
if (edad>17){ | |
console.log("Eres mayor de edad"); | |
}else{ | |
console.log("No eres mayor de edad"); | |
}/*el bloque ELSE solo se ejecutará si la variable edad<=17*/</script></body> | |
</html> |
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
let edad=17; | |
if (edad>17){ | |
console.log("Eres mayor de edad"); | |
}else{ | |
console.log("No eres mayor de edad"); | |
}/*el bloque ELSE solo se ejecutará si la variable edad<=17*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment