For those who are looking for the whole translation table:
Here is a demo , and here is the whole source code .
var morseCode = { '.-': 'a', '-...': 'b', '-.-.': 'c', '-..': 'd', '.': 'e', '..-.': 'f', '--.': 'g', '....': 'h', '..': 'i', '.---': 'j', '-.-': 'k', '.-..': 'l', '--': 'm', '-.': 'n', '---': 'o', '.--.': 'p', '--.-': 'q', '.-.': 'r', '...': 's', '-': 't', '..-': 'u', '...-': 'v', '.--': 'w', '-..-': 'x', '-.--': 'y', '--..': 'z', '-----': '0', '.----': '1', '..---': '2', '...--': '3', '....-': '4', '.....': '5', '-....': '6', '--...': '7', '---..': '8', '----.': '9', '.--.-': 'Γ ', '.--.-': 'Γ₯', '.-.-': 'Γ€', '----': 'ch', '.-..-': 'Γ¨', '..-..': 'Γ©', '---.': 'ΓΆ', '..--': 'ΓΌ', '...--..': 'Γ', '--.--': 'Γ±', '.-.-.-': '.', '--..--': ',', '---...': ':', '-.-.-.': ';', '..--..': '?', '-....-': '-', '..--.-': '_', '-.--.': '(', '-.--.-': ')', '.----.': '\'', '-...-': '=', '.-.-.': '+', '-..-.': '/', '.--.-.': '@' };