Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/82ec41c5dc53f3f99a51ebb46b720819 to your computer and use it in GitHub Desktop.
Save parzibyte/82ec41c5dc53f3f99a51ebb46b720819 to your computer and use it in GitHub Desktop.
!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Mayor o menor de edad</title>
<script>
const edadDelUsuario = parseInt(prompt("¿Cuál es tu edad?"));
if(edadDelUsuario >= 18){
alert("Eres mayor de edad");
}else{
alert("Eres menor de edad");
}
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment