Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Underscore - Loops
var t2 = _.template(
"Users: <%_.forEach(users, function (u,i) {%>"
+ "<%if (i>0) {%>, <%}%>"
+ "<%=u%>"
+ "<%})%>"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment