Skip to content

Instantly share code, notes, and snippets.

@lmgeorge
Forked from beausmith/Slim for loop
Last active August 29, 2015 14:25
Show Gist options
  • Save lmgeorge/a5b9c44ec5447bc15bb7 to your computer and use it in GitHub Desktop.
Save lmgeorge/a5b9c44ec5447bc15bb7 to your computer and use it in GitHub Desktop.
Iterating through an array using a for loop in slim lang template
- for i in (1..5)
div #{i}
- for i in [0,4,8,12,16,20,24] do
div #{i} #{i + -12}
- if (i == 0)
div 0
- elsif (i < 12)
div lt 12
- else
div foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment