Challenge: Writing First Function
Uppgift
Swipe to start coding
You are writing a simple function to generate a personalized greeting.
- Define a function called
greeting
that takes a parameter calledname
. - The function should return a greeting in the format:
"Hello, name!"
. - Use the
return
statement to ensure the function outputs the correct result.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 6. Kapitel 4