Created
August 6, 2021 16:05
-
-
Save louislatreille/869abf2e927aa84f44531b05fcb9b4cd to your computer and use it in GitHub Desktop.
(Article) You should aim to forget how your code works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const decodeMorse = (morseCode) => { | |
return morseCode | |
.trim() | |
.split(/ | /) | |
.map( (code) => MORSE_CODE[code] || ' ') | |
.join(''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment