Answer the question
In order to leave comments, you need to log in
How to set an array in pug jade using if?
How to set an array in pug jade using if?
There is a basic view template
- var x = 4;
- var num = ["1", "2", "3", "4"];
- var text = ["a", "b", "c", "d"]
- for (var i = 1; i <= x; i++) {
div(class='class' + i)= num[i]
include menu-1
- }
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