split()
Hi,
I'm running this function on a string, but sometimes that string doesn't have a " "... how can I test to see if it does or not before running the function.. so I don't get errors...
function trimFat(str)
{
var temp = new Array();
temp = str.split(" ");
return (temp[0]);
}
|