I have a javascript array with contains a bunch of anchor elements like this:
["<a href="#" id="id1">First anchor<a>", "<a href="#" id="id2">Second anchor<a>", "<a href="#" id="id3">Third anchor<a>"]
I would like to change just the text in the last anchor element (Third anchor) while keeping the attributes of the anchor element itself unchanged (meaning I want to keep my id and href attributes intact). How would I do this and returned the changed array?