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

Add SwitchStatement #91

Merged
merged 1 commit into from Jan 6, 2023
Merged

Add SwitchStatement #91

merged 1 commit into from Jan 6, 2023

Conversation

evgenykuzyakov
Copy link
Contributor

Fixes: #68

const expr = 'Papayas';
switch (expr) {
  case 'Oranges':
    console.log('Oranges are $0.59 a pound.');
    break;
  case 'Mangoes':
  case 'Papayas':
    console.log('Mangoes and papayas are $2.79 a pound.');
    // expected output: "Mangoes and papayas are $2.79 a pound."
    break;
  default:
    console.log(`Sorry, we are out of ${expr}.`);
}

@cloudflare-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 43f0416
Status: ✅  Deploy successful!
Preview URL: https://72774244.viewer-xlt.pages.dev
Branch Preview URL: https://add-switch-statement.viewer-xlt.pages.dev

View logs

@evgenykuzyakov evgenykuzyakov merged commit 44672ff into master Jan 6, 2023
@evgenykuzyakov evgenykuzyakov deleted the add-switch-statement branch January 6, 2023 20:30
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.

Add switch/case/default
1 participant