for(i in s=prompt()){s+=" ";b=" etianmsurwdkgohvf l pjbxcyzq".indexOf(s[i]);for(l=1;b-l>=0;b-=l,l*=2);while(l>>=1)s+=".-"[(b&l)/l]}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 characters a..z (lowercase ASCII letters) are allowed, other characters ignored (resulting in an additional space in the output).