Created
July 13, 2017 18:09
-
-
Save ethanstenis/6a222df6ecde73ac8bdd85840643a717 to your computer and use it in GitHub Desktop.
This is the solution for the Codewars Kata: Welcome!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function greet(language) { | |
var database = { | |
english: "Welcome", | |
czech: "Vitejte", | |
danish: "Velkomst", | |
dutch: "Welkom", | |
estonian: "Tere tulemast", | |
finnish: "Tervetuloa", | |
flemish: "Welgekomen", | |
french: "Bienvenue", | |
german: "Willkommen", | |
irish: "Failte", | |
italian: "Benvenuto", | |
latvian: "Gaidits", | |
lithuanian: "Laukiamas", | |
polish: "Witamy", | |
spanish: "Bienvenido", | |
swedish: "Valkommen", | |
welsh: "Croeso" | |
}; | |
for (var key in database) | |
{ | |
if (key == language) | |
{ | |
return database[key]; | |
} | |
} | |
return database["english"]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment