each

The @each tag let you loop over an array or an object of values.

@each(username in ['virk', 'nikk', 'romain'])
{{ username }}
@end

You can access the array index as follows:

@each((username, key) in ['virk', 'nikk', 'romain'])
{{ key }} - {{ username }}
@end

Similarly, you can also loop over objects.

@each((amount, ingredient) in {
ketchup: '5 tbsp',
mustard: '1 tbsp',
pickle: '0 tbsp'
})
Use {{ amount }} of {{ ingredient }}
@end