Skip to content

Instantly share code, notes, and snippets.

@sarathlal-old
Forked from kavanagh/wrap-paragraphs.js
Created July 31, 2019 06:57
Show Gist options
  • Save sarathlal-old/c08dbecc1833a40dbd845cf860cfdb91 to your computer and use it in GitHub Desktop.
Save sarathlal-old/c08dbecc1833a40dbd845cf860cfdb91 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