Skip to content

Instantly share code, notes, and snippets.

@Backoo
Forked from kavanagh/wrap-paragraphs.js
Created January 26, 2019 18:13
Show Gist options
  • Save Backoo/6c40e49badaf054fd8b8f45a3c9ed024 to your computer and use it in GitHub Desktop.
Save Backoo/6c40e49badaf054fd8b8f45a3c9ed024 to your computer and use it in GitHub Desktop.
Wrap an array of strings with p tags
var paragraphs = ['paragraph 1', 'paragraph 1'];
var html = '<p>' + paragraphs.join('</p><p>') + '</p>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment