Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
- </head>
- <body>
- </body>
- <script>
- let variable = 17
- /*
- operadores logicos
- > mayor
- < menor
- == igual
- <= menor o igual
- >= mayor o igual
- !== distinto
- */
- if(variable >= 18){
- console.log("eres adulto")
- }
- //false
- if(variable <= 18){
- console.log("no eres adulto");
- }
- // true
- if(variable !== 18){
- console.log("tambien eres adulto")
- }
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement