← Back to challenges

Name Greeting!

JavaScriptHardstringslanguage_fundamentalsformatting

Instructions

Create a function that takes a name and returns a greeting in the form of a string. Don't use a normal function, use an arrow function.

Examples

helloName("Gerald") ➞ "Hello Gerald!"

helloName("Tiffany") ➞ "Hello Tiffany!"

helloName("Ed") ➞ "Hello Ed!"

Notes

  • The input is always a name (as string).
  • Don't forget the exclamation mark!
  • If you get stuck on a challenge, find help in the Resources tab.
  • If you're really stuck, unlock solutions in the Solutions tab.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Is the Number Even or Odd?