C
C
chesar2014-10-30 11:28:23
Pug
chesar, 2014-10-30 11:28:23

Jade template engine. How to declare a multiline array?

I would like to declare an array of variables which is then passed to the mixin

- var newsList = [
    {pubDate : '23:48', item: 'title1' ,url:''},
    {pubDate : '22:43', item: 'title2' ,url:''},
    {pubDate : '13:48', item: 'title3' ,url:''},
    {pubDate : '03:14', item: 'title4' ,url:''},
]

But this construction gives an error. It is necessary to write everything in one line and such formatting is not possible?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maksim Zverev, 2014-10-30
@chesar

Yes, single line only

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question