Skip to content

Instantly share code, notes, and snippets.

@wildskyf
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save wildskyf/083bad541b81e21d2b36 to your computer and use it in GitHub Desktop.

Select an option

Save wildskyf/083bad541b81e21d2b36 to your computer and use it in GitHub Desktop.
Between a range
a = undefined
b = 13 # this could be anything you input
if b < 5
a = 1
else if b >= 5 and b < 15
a = 2
else # which is b >= 15
a = 3
################## or #####################
a = if b < 5 then 1 else ( if b < 15 then 2 else 3 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment