Write a program that requests the user’s language and then prints a greeting in that language. You must include at least five different languages.
var stringArray = ["Bonjour", "Hola", "Salve", "Guten Tag", "God dag"];
var language =parseInt(prompt("1. French\n2. Spanish\n3. Italian\n4. German\n5. Swedish"));
alert(stringArray[language-1]);
Comments
Leave a comment