node.js - How do I re-arrange how my loop works? -
i working on message board , want new topics first in line. using foreach loop print out topics new ones going under old ones. how fix this?
my foreach code
<% threads.foreach(function(thread){ %> "><%= thread.subject%>
posted by:-
you can use reverse
<% threads.reverse().foreach(function(thread){ %> "><%= thread.subject%>
Comments
Post a Comment