I have a question of using Pug : How to iterate on array/slice/map in Pug ?
For single values, we know the following will work : h4= .Title h4= .Message
This works too : h4 #{.Title} h4 #{ .Message}
But, how to use the usual pug syntax for iteration like the following ? ul each val in ["Java", "Go", "Rust", "C++", "FoxPro/Clipper"] li= val
I have searched for this, but haven't found anywhere.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have a question of using Pug :
How to iterate on array/slice/map in Pug ?
For single values, we know the following will work :
h4= .Title
h4= .Message
This works too :
h4 #{.Title}
h4 #{ .Message}
But, how to use the usual pug syntax for iteration like the following ?
ul
each val in ["Java", "Go", "Rust", "C++", "FoxPro/Clipper"]
li= val
I have searched for this, but haven't found anywhere.