I would like to create a morse code generator. I want to split a sentence into individual letter strings, and input it in my function, but I don't know how to do it.

```
var count='';
function cc(card){
   switch(card){
       case 'A':count+='.- '
       break;
       case 'B':count+='-...   '
       break;
       case 'C':count+='-.-.   '
       break;
       case 'D':count+='-..    '
       break;
       case 'E':count+=' . '
       break;
       case 'F':count+='..-.   '
       break;
       case 'G':count+='--.    '
       break;
       case 'H':count+='....   '
       break;
       case 'I':count+='.. '
       break;
       case 'J':count+='.---   '
       break;
       case 'K':count+='-.-    '
       break;
       case 'L':count+='.-..   '
       break;
       case 'M':count+='-- '
       break;
       case 'N':count+='-.'
       break;
       case 'O':count+='---    '
       break;
       case 'P':count+='.--.   '
       break;
       case 'Q':count+='--.-   '
       break;
       case 'R':count+='.-.    '
       break;
       case 'S':count+='...    '
       break;
       case 'T':count+='-'
       break;
       case 'U':count+='..-    '
       break;
       case 'V':count+='...-   '
       break;
       case 'W':count+='.--    '
       break;
       case 'X':count+='-..-   '
       break;
       case 'Y':count+='-.--   '
       break;
       case 'Z':count+='--..   '
       break;
       case 1:count+='.----    '
       break;
       case 2:count+='..---    '
       break;
       case 3:count+='...--    '
       break;
       case 4:count+='....-    '
       break;
       case 5:count+='.....    '
       break;
       case 6:count+='-....    '
       break;
       case 7:count+='--...    '
       break;
       case 8:count+='---..    '
       break;
       case 9:count+='----.    '
       break;
       case 10:count+='.----   ,-----  '
       break;
       case 0:count+='-----    '
       break;
   }
   return count;
}

console.log(cc("A"));

```