Created
September 25, 2019 13:41
-
-
Save onliniak/1c8b8dd0d9e12877c76f39df08532e02 to your computer and use it in GitHub Desktop.
Modern js → multi-lines, regex and optional semicolons.
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
//you should replace ä with any non-usable character. | |
test = ` | |
ä | |
. | |
heloo | |
ä | |
`.replace(/(\s{4})/, "START") | |
.replace(".", "DISPLAY") | |
.replace(/(\s{2})/, "STOP") | |
.replace(/ä/g, "") | |
alert(test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment