In my website, I have title that is kind of like this:
<title>Current Title → Sub Title → My Site</title>
I want to display the Sub Title
part of the title in some of my html elements... so I wrote this JavaScript code to print the title, but only the text in between the 1st and 2nd →
"<script>document.write(document.title.split("\u2192")[1]);</script>"
But that code outputs " Sub Title "
with a space in front and behind it. Do you know how I can somehow delete the 2 spaces using javascript (without changing the title) to output something like this: "Sub Title"
?
Thanks!