Skip to content

Instantly share code, notes, and snippets.

@JoelPerea5j
Created February 6, 2025 19:04
Show Gist options
  • Save JoelPerea5j/ff22f5beaa4e55eb96243301ff7c2c5d to your computer and use it in GitHub Desktop.
Save JoelPerea5j/ff22f5beaa4e55eb96243301ff7c2c5d to your computer and use it in GitHub Desktop.
Funcion repetir
// Parametros opcionales Posicionales
void Saludar(String nombre, [String? mensaje]) {
print ("Hola $nombre, ${mensaje ?? ""}");
}
//Parametros Opcionales Nombrados
void mostrarInfo({String? nombre, int? edad}){
print("Nombre: $nombre, Edad: $edad");
}
void main(){
print("Joel Perea 22308051281272");
Saludar("Joel Perea","¿Como Estas?");
mostrarInfo(nombre:"Joel",edad:17);
}
@JoelPerea5j
Copy link
Author

Salida

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment