Would it make more sense if it read:
var theReturnValue = checkCharType(myString);
switch (theReturnValue)
{
...
That's all its doing - using the return value for the switch statement only, then its discarded. If you like you can think of
JS creating a temporary variable in memory containing the return value.
hth
Phil