Probably a easy thing to do but how do I get javascript to only split if something is there, if not leave it as is
<p>I'm using the following to get the title from a feed:</p>

<pre><code>var posttitleGETcalendar = entry.title.$t;
var posttitleREMcalendar = posttitleGETcalendar.split("_");
var title =  posttitleREMcalendar[0] + "&lt;small&gt;" + posttitleREMcalendar[1] + "&lt;/small&gt;";
</code></pre>

<p>What I'm trying to do is split the titles I get after underscore and add the tag small to the part after it.
Works great when underscore is there, but it shows the word <i>undefined</i> after last word if underscore is not on title.
Is there a way to use </p>

<pre><code>if underscore is on title, do 
if not, leave it as is
</code></pre>

<p>Thank you.</p>
