Javascript: Adding selected text to an array
- by joeybaker
My goal: each time a user selects text, and clicks a button, that text gets added to an array.
The problem: each time the button is pressed, the all objects of the array get overridden with the currently selected text.
I'd really appreciate help changing the behavior so that the selected text doesn't override all previous array items.
<script…