Ad
Code
Diff
  • let greeting = {
      en: 'Hello',es: 'Hola',
      de: 'Hallo',fr: 'Bonjour',
      ja: 'こんにちは',ro: 'buna',
      ru: 'Здравствуйте',zh: '你好',
      ko: '안녕하세요',tr: 'Merhaba',
      vi: 'xin chào'}
    const sayHello = (lang,name) => lang ? `${greeting[lang]} ${name}!` : "I don't speak that langauge"
    
    • function sayHello(input) {
    • return !input ? "Hello World!" : "Hello " + input + "!"
    • };
    • let greeting = {
    • en: 'Hello',es: 'Hola',
    • de: 'Hallo',fr: 'Bonjour',
    • ja: 'こんにちは',ro: 'buna',
    • ru: 'Здравствуйте',zh: '你好',
    • ko: '안녕하세요',tr: 'Merhaba',
    • vi: 'xin chào'}
    • const sayHello = (lang,name) => lang ? `${greeting[lang]} ${name}!` : "I don't speak that langauge"