Skip to content

Instantly share code, notes, and snippets.

@craigmdennis
Created April 21, 2015 21:03
Show Gist options
  • Save craigmdennis/db9c92a026a5e9bd304b to your computer and use it in GitHub Desktop.
Save craigmdennis/db9c92a026a5e9bd304b to your computer and use it in GitHub Desktop.
Simple looping mixin for JADE
mixin loop( count )
- var n = 0
while n < count
block
- n++
// Usage
+loop(4)
p Hello world!
// Result
// <p>Hello world!</p>
// <p>Hello world!</p>
// <p>Hello world!</p>
// <p>Hello world!</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment