Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A fast way to build a list/string from an array
var arr = ['item 1', 'item 2', 'item 3'];
var list = '<ul><li>' + arr.join('</li><li>') + '</li></ul>';
console.log(list);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment