for(i in s=prompt("").toLowerCase()){s+=" ";b=" etinamsdrgukwohblzfcpövxäqüyj".indexOf(s[i]);while(b>0){s+="-."[b--&1];b=b/2|0}}alert(s)
Description
Morse code in a tweet ;)
Enter your message at the prompt, an alert-Box shows the message combined with it's morse code representation.
Only ASCII letters a..z/A..Z and german umlauts äöü/ÄÖÜ are supported, other characters ignored (resulting in an additional space in the output).
Update of #533: shorter algorithm, so room left to support upper case, prevent "undefined" prompt message, include umlauts.