Answer the question
In order to leave comments, you need to log in
How to iterate values from an array in different elements in PUG?
There is a construction like this, which is repeated 10 times:
.sidebar__tags-item
a(href="#") #tag
span 10
a
and span
I want to take from an array of the form: - var tags = ["#life", "#weekend", "#thoughts"]
- var tagsCount = ["10", "20", "30"]
include data.pug
.sidebar__tags-item
a(href="#") !{tags[0]}
span !{tagsCount[0]}
...
.sidebar__tags-item
, and I need 10 with different values from the array. And is this even possible? :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question