I have a string that has the following format: <strong>FirstName LastName</strong>
How can I change this into an array with the first element firstName and second lastName?
I did this, but no luck, it won't produce the right result:
var data = [myString.split('<strong>')[1], myString.split('<strong>')[2]]
How can I produce ["firstName", "lastName"] for any string with that format?
myString.split('<strong>')returns the following array:["", "FirstName LastName</strong>"]. There is no second element, and the first element won't help you produce valid results..textContent?