Timer: 3 min, like in an interview. Hints and autocomplete are off while it runs
Welcome by language
EasyMap and Set3 min
Greetings in different languages are already in the Map GREETINGS. The key is the language name, the value is the greeting.
Write a function greet(language) that returns the greeting in that language. If the language is not in the dictionary, return the English 'Welcome'.
Examples
greet('dutch')Returns 'Welkom'
greet('IP_ADDRESS_INVALID')Returns 'Welcome'
Loading the editor...
- Input
greet('dutch')Expected'Welkom' - Input
greet('english')Expected'Welcome' - Input
greet('IP_ADDRESS_INVALID')Expected'Welcome'
Hidden tests run on Submit