An unusual but beautiful way to do it.
Without index :
each _ in Array(5) = 'a'
Will be printed: aaaaa
With an index :
each _, i in Array(5) = i
It will be printed: 01234
Notes . In the above examples, I assigned the jade each iteration syntax val parameter to _ because it is necessary, but will always return undefined .
Christophe Marois Apr 25 '16 at 21:53 2016-04-25 21:53
source share