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

Switch statement documentation seems to be wrong. #187

Open
BigZaphod opened this issue Feb 28, 2021 · 1 comment
Open

Switch statement documentation seems to be wrong. #187

BigZaphod opened this issue Feb 28, 2021 · 1 comment

Comments

@BigZaphod
Copy link

On this page: https://imba.io/language/operators

Switch is documented as having a syntax like this:

switch status
when "completed"
  console.log "This project has been completed"
when "archived"
  console.log "This project has been archived"
else
  console.log "This project is active"

However it appears to actually have a syntax like this (note indented when):

switch status
  when "completed"
    console.log "This project has been completed"
  when "archived"
    console.log "This project has been archived"
  else
    console.log "This project is active"
@poeck
Copy link
Contributor

poeck commented Nov 1, 2021

Looks like this has already been fixed.

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

No branches or pull requests

2 participants