Last active
March 6, 2018 06:11
-
-
Save parzibyte/432df0d46c60ecdc22111ce70b184364 to your computer and use it in GitHub Desktop.
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
package main | |
import "fmt" | |
func main(){ | |
accesoPermitido := false | |
edad := 18 | |
if edad >= 18{ | |
accesoPermitido = true | |
} | |
if accesoPermitido{ // Notar que no es necesario comparar accesoPermitido == true | |
fmt.Println("Acceso concedido!") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment