DEV Community

Discussion on: 📖 Go Fiber by Examples: How can the Fiber Web Framework be useful?

Collapse
 
lexiebkm profile image
Alexander B.K.

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.