Decoding Morse Code With JavaScript