Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Humoud AlGhanim #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Humoud AlGhanim #2

wants to merge 6 commits into from

Conversation

HAlGhanim
Copy link

No description provided.

return `Bonjour ${name}`;
case "tr":
return `Merhaba ${name}`;
} // replace the empty string with what you see is fit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something that I personally prefer to switch statements is to use an object literal as a "dictionary":

const greetings = {
  en: "Hello",
  es: "Hola",
  fr: "Bonjour",
  tr: "Merhaba",
};

return `${greetings[language]} ${name}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants