Greet a Rustacean
Level: intro (score: 1)
Welcome aboard, fellow Rustacean!
In this exercise, you'll implement a function that returns a greeting.
If a name is provided (using an Option), your function should return "Hello, <name>! Don't Panic!"
.
Otherwise, it returns the default "Hello, World! Don't Panic!"
.
This playful twist not only familiarizes you with basic function syntax and string handling in Rust, but also gets you comfortable with the Option type—an essential tool for writing robust, real-world Rust code.
Enjoy the journey and remember: Don't Panic!