I have a structure like this:
<ul>
<li>text1</li>
<li>text2</li>
<li>text3</li>
</ul>
How do I use javascript or jQuery to get the text as an array?
['text1', 'text2', 'text3']
My plan after this is to assemble it into a string, probably using .join(', ')
, and get it in a format like this:
'"text1", "text2", "text3"'